At the moment we ingest this PUT tool with multiple manifestation folders Preservica_preservation1_lnk and Preservica_preservation2_lnk, which creates seperate content objects within the preservation representation
Is it possible to generate this with pyPreservica?
Yes, although its not documented yet because its slightly more complicated.
You create the package using:
generic_asset_package(preservation_files_dict=None, access_files_dict=None, export_folder=None, parent_folder=None, compress=True, **kwargs):
Here
preservation_files_dict is python dict containing any number of preservation representations, the key of the dict is the name of the preservation representation and the value is a list of content objects.
e.g. a book with multiple pages, scanned as JP2 & TIFF as long term preservation and a PDF access copy
preservation_files = {}
access_files = {}
preservation_files["JP2000 Images"] = ["page1.jp2", "page2.jp2", "page3.jp2"]
preservation_files["TIFF Images"] = ["page1.tif", "page2.tif", "page3.tif"]
access_files["PDF version"] = ["book.pdf"]
package = generic_asset_package(preservation_files_dict=
preservation_files , access_files_dict=
access_files)
Regarding the create_folder() call, this function returns the new folder as an object.
new_folder = client.create_folder("title", "description", "open")
print(new_folder.reference)