Skip to main content

Python module for creating a local OCFL storage structure from a Preservica repository

Project description

preservica-ocfl

This library provides a Python module which will create a local Oxford Common File Layout (OCFL) Specification storage structure from a Preservica repository. Content is exported from Preservica as OPEX packages using the API and saved locally in a OCFL compliant structure.

Preservica repository as a local OCFL storage structure

This Oxford Common File Layout (OCFL) specification describes an application-independent approach to the storage of digital information in a structured, transparent, and predictable manner. It is designed to promote long-term object management best practices within digital repositories.

https://ocfl.io/

This project uses the OCFL Core https://github.com/inveniosoftware/ocflcore library to create the OCFL inventory metadata.

Limitations

The preservica-ocfl module creates OCFL specification 1.1 file structures. It does not support the OCFL 1.0 specification.

The library creates OCFL objects from each Preservica Asset. It currently does not look for modifications in Preservica to create new OCFL versions. Each Asset in Preservica is mapped to a v1 OCFL object.

If OCFL objects already exist for a Preservica Asset then they will be ignored.

OPEX

The information stored within the OCFL object depends on the type of OPEX package exported from Preservica.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/carj/preserva-ocfl

Support

preservica-ocfl is 3rd party open source library and is not affiliated or supported by Preservica Ltd. There is no support for use of the library by Preservica Ltd. Bug reports can be raised directly on GitHub.

Users of preservica-ocfl should make sure they are licensed to use the Preservica REST APIs.

License

The package is available as open source under the terms of the Apache License 2.0

Installation

preservica-ocfl is available from the Python Package Index (PyPI)

https://pypi.org/project/preserva-ocfl/

To install preservica-ocfl, simply run this simple command in your terminal of choice:

$ pip install preservica-ocfl



$ python -m preservica-ocfl -r STORAGE_ROOT -c a7ad52e3-2cb3-4cb5-af2a-3ab08829a2a8

```
usage: preservica-ocfl [-h] -r STORAGE_ROOT [-c COLLECTION] [-t THREADS] [-d DIRECTORY_DEPTH] [--parent-folders PARENT_FOLDERS] [-u USERNAME] [-p PASSWORD] [-s SERVER]

Create a local OCFL storage root from a Preservica repository

options:
  -h, --help            show this help message and exit
  -r STORAGE_ROOT, --storage-root STORAGE_ROOT
                        The OCFL Storage Root
  -c COLLECTION, --collection COLLECTION
                        The Preservica parent collection uuid, ignore to process the entire repository
  -t THREADS, --threads THREADS
                        The number of export threads, defaults to 1
  -d DIRECTORY_DEPTH, --directory-depth DIRECTORY_DEPTH
                        The number of directory components below the storage root, 
                        defaults to 2 Can be any of (1, 2, 3, 4)
  --parent-folders PARENT_FOLDERS
                        The OCFL object includes Preservica Parent Hierarchy information. 
                        This corresponding flag should also be set on the OPEX export workflow
  -u USERNAME, --username USERNAME
                        Your Preservica username if not using credentials.properties
  -p PASSWORD, --password PASSWORD
                        Your Preservica password if not using credentials.properties
  -s SERVER, --server SERVER
                        Your Preservica server domain name if not using credentials.properties

Preservica requires an active Export workflow, which be configured to include "Content" and "Metadata"




```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

preservica_ocfl-0.0.2.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

preservica_ocfl-0.0.2-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file preservica_ocfl-0.0.2.tar.gz.

File metadata

  • Download URL: preservica_ocfl-0.0.2.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for preservica_ocfl-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7523a4930543edb207665e1268fe05d3ba642e1f8cf32b229e51f329b71ddb0d
MD5 16669f2c2c00b67865a0460cfa2ba265
BLAKE2b-256 5d89fd50e3e03e7e81854c8ecaa69a3d438ec08866a3a5c2ca3189d3abd3497f

See more details on using hashes here.

File details

Details for the file preservica_ocfl-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for preservica_ocfl-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f53b5f53c5011b7fb2b5cc53a4a6d75574275a6c5bb45accb95a66e0c474b1b7
MD5 1f11b4b79015b806883c43f00eb8cd00
BLAKE2b-256 ea420d884ed714b04b9b1ba3850237e415cdf6708f67903afd4191e793db690a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page