bcf.v3.document#

BCF XML V3 Documents handler.

Module Contents#

class bcf.v3.document.DocumentsHandler(definition: bcf.v3.model.DocumentInfo, documents: Optional[dict[str, bytes]] = None, xml_handler: Optional[bcf.xml_parser.AbstractXmlParserSerializer] = None)#

BCF documents handler.

classmethod load(cls, zip_file: zipfile.ZipFile, xml_handler: Optional[bcf.xml_parser.AbstractXmlParserSerializer] = None) Optional[DocumentsHandler]#

Loads the documents from the given zip file directory.

Args:

zip_path: The directory path inside the zip file. xml_handler: The xml parser/serializer to use.

Returns:

The documents handler.

save(self, bcf_zip: bcf.inmemory_zipfile.ZipFileInterface) None#

Save the documents to the zip file.