skillfed

rocrate

RO-Crate metadata generator/parser

rocrate v0.15.1 256.2K downloads/30d#8,467 on PyPI86
Permissive license Apache-2.0 Active released

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 rocrate

uv

uv add rocrate

poetry

poetry add rocrate

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Information TechnologyOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Topic :: InternetTopic :: Internet :: WWW/HTTPTopic :: Software Development :: LibrariesTopic :: System :: ArchivingTopic :: System :: Archiving :: Packaging

Tags

research object crate metadataro-crate python libraryresearch data packagingjsonld metadata generatorscientific data crate creationresearch object serializationcrate metadata parser
research-datametadatajsonld

More Libraries packages