rocrate
RO-Crate metadata generator/parser
What it is and what it does
rocrate is a Python library that implements the RO-Crate specification for packaging research outputs with structured metadata. It lets you create crates by adding files, directories, and contextual entities (persons, organizations, etc.) and then expressing relationships between them—all serialized to a JSON-LD metadata file alongside the data. The library handles both creation (building crates from local or remote files) and consumption (reading existing crates), supporting RO-Crate versions 1.0, 1.1, and 1.2.
The library abstracts away the JSON-LD and URI encoding details, providing a Python object model where you add files and entities, set properties, and write the result to disk or a zip archive. It depends on requests, arcp, jinja2, python-dateutil, and click—all stable, widely-used packages. The codebase is actively maintained and classified as Alpha, indicating it is functional but may still evolve.
Use it for:
- Package research datasets with metadata describing authors, affiliations, and data provenance for archival or sharing.
- Create reproducible research bundles that include code, data, and documentation with explicit relationships between components.
- Convert existing file collections into RO-Crate format for compliance with research data management standards.
- Build metadata-driven workflows where research outputs are tagged with contextual information and serialized for preservation.
- Integrate RO-Crate generation into data processing pipelines to automatically document inputs, outputs, and processing steps.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
rocrate is a Python library for creating and consuming Research Object Crates—structured metadata packages that describe research outputs, files, and their relationships according to the RO-Crate specification.
Yes, if you need to create or work with RO-Crate metadata packages for research data management. The library is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. It is suitable for production use in research workflows, though its Alpha status suggests the API may evolve—pin the version if stability is critical.
Install
rocrate on PyPI
pip
pip install rocrateuv
uv add rocratepoetry
poetry add rocrateInstalling rocrate
Before you install
Low install friction with a pure-Python wheel and five common dependencies. Active maintenance with a recent release 35 days ago and ongoing repository activity.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install rocrate
from rocrate.rocrate import ROCrate
from rocrate.model.person import Person
crate = ROCrate()
paper = crate.add_file("paper.pdf", properties={"name": "manuscript"})
alice = crate.add(Person(crate, "https://orcid.org/0000-0000-0000-0000", properties={"name": "Alice"}))
paper["author"] = [alice]
crate.write("output_crate")
Requires Python 3.9 or later.
Verify before relying
- Whether the library handles all RO-Crate 1.2 specification features or only a subset of entity types.
- Performance characteristics when working with large crates or many files.
- Whether the ga2cwl extra dependency is maintained and what Galaxy workflow conversion coverage it provides.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — requests, arcp, jinja2, python-dateutil, click |
| Maintenance | actively maintained — 35 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 256,156/month — #8,467 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: rocrate-0.15.1-py3-none-any.whl
Keywords: researchobject, ro-crate, ro, metadata, jsonld
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
repo2rocrateGenerates RO-Crate metadata from workflow…
permissive · top 15,000 on PyPI
mlcroissantValidates and loads datasets described in the…
unclear · top 15,000 on PyPI
python-olmPython bindings for the Olm cryptographic…
permissive · top 5,000 on PyPI
rdflib-jsonldProvides JSON-LD parsing and serialization for…
permissive · top 15,000 on PyPI
rdflibRDFLib is a Python library for parsing,…
permissive · top 1,000 on PyPI
cmeel-urdfdomParses URDF (U-Robot Description Format) XML…
permissive · top 5,000 on PyPI
prefixcommonsConverts between CURIEs (compact URI…
permissive · top 15,000 on PyPI
typed-json-dataclassAdds JSON serialization and type validation to…
permissive · top 15,000 on PyPI