lpod.container

class lpod.container.odf_container(path_or_file)

Bases: object

Representation of the ODF file.

clone()

Make a copy of this container with no path.

del_part(path)

Mark a part for deletion.

get_part(path)

Get the bytes of a part of the ODF.

get_parts()

Get the list of members.

save(target=None, packaging=None, backup=False)

Save the container to the given target, a path or a file-like object.

Package the output document in the same format than this document, unless “packaging” is different.

Arguments:

target – str or file-like

packaging – ‘zip’ or ‘flat’, or for debugging purpose ‘folder’

backup – boolean

set_part(path, data)

Replace or add a new part.

lpod.container.odf_get_container(path_or_file)

Return an odf_container instance of the ODF document stored at the given local path or in the given (open) file-like object.

lpod.container.odf_new_container(path_or_file)

Return an odf_container instance based on the given template.

Previous topic

lpod.const

Next topic

lpod.content

This Page