Skip to main content

ocfl-py - A Python implementation of OCFL

Project description

ocfl-py is a Python reference implementation of the Oxford Common File Layout (OCFL). It also provides a number of command-line tools that may be useful for validating and manipulating OCFL Objects and OCFL Storage Roots. The code attempts to follow the current Draft OCFL specification v1.1 while retaining support for v1.0. See implementation status for errors and warnings for details of validator support.

See also OCFL-Core which is another Python implementation of OCFL, designed to support the InvenioRDM repository, and other OCFL implementations.


This code requires Python 3.

This code attempts to support the OCFL specifications v1.1 draft and v1.0. To get the most up to date version check out the main branch from github.

I hope to keep a fairly current version on PyPI, which can be installed or upgraded with:

pip install –upgrade ocfl-py

The latest version is in the main branch on github.


There should then be four command-line scripts available:

  • - validate OCFL objects, OCFL storage roots or standalone OCFL inventory files

  • - build, manipulate, extract from or validate an OCFL object

  • - add or access OCFL objects under an OCFL storage root

  • - update OCFL inventory sidecar file (useful for manually building examples and test cases)

Each script takes -h for help.

See examples in docs folder for use of these scripts.

The code is also available as a module ocfl for other python code to use.


Bug reports welcome as github issues.

See for guidelines for contributing.

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

ocfl-py-1.3.0.tar.gz (45.7 kB view hashes)

Uploaded source

Built Distribution

ocfl_py-1.3.0-py3-none-any.whl (54.6 kB view hashes)

Uploaded py3

Supported by

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