--- id: rocrate version: "0.15.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # rocrate — RO-Crate metadata generator/parser License: permissive · Maintenance: active · Downloads: 256.2K/mo ## 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 above — 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 pip install rocrate uv add rocrate 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_current - Install friction: low - Maintenance: active - Downloads: 256.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags research object crate metadata, ro-crate python library, research data packaging, jsonld metadata generator, scientific data crate creation, research object serialization, crate metadata parser, research-data, metadata, jsonld [View on SkillFed](https://skillfed.io/packages/rocrate) · [View on PyPI](https://pypi.org/project/rocrate/)