carj / pyPreservica

Python language binding for the Preservica API
https://pypreservica.readthedocs.io
Apache License 2.0
14 stars 2 forks source link

Using SHA256 independently of creating a package #12

Closed marcelomgarcia closed 7 months ago

marcelomgarcia commented 1 year ago

This is continuation of Preserve directory structure with complex_asset_package(). We have an ingest script (provided by Preservica), ingest.py, that works fine, but it uses SHA1, and we need SHA256.

From PyPreservica documentation it seems that to use Fixity, we need to use it with *_asset_package, but as discussed in issue #10, we loose the directory structure. Is there a way to generate the zip file "by hand," like in the ingest.py, and still use Sha256FixityCallBack to generate the SHA256?

carj commented 1 year ago

If you create SIPs by hand, you still will not be able to preserve internal directory structure within the AIP. This limitation is due to the way Preservica stores the AIP, it is not due to a limitation with the Python library.

see:

https://community.preservica.com/preservica-editions-88/preserve-directory-structure-with-complex-asset-package-1815?postid=6478#post6478

If you need to change the default fixity you can use:

https://pypreservica.readthedocs.io/en/latest/upload.html#custom-fixity-generation