roc-validator
A Python package to validate RO-Crates
What it is and what it does
roc-validator is a Python package that checks whether RO-Crate metadata packages conform to their declared profiles. RO-Crates are structured research data containers that bundle files with machine-readable metadata; this tool validates that metadata against SHACL shapes and Python rules for the base RO-Crate profile and several specialized extensions including Workflow RO-Crate, Workflow Testing, and various run crates. It works with crates stored locally as directories or ZIP files, or accessible remotely via HTTP/HTTPS.
You can use it as a command-line tool or import it into Python code to validate programmatically. The validator reports issues at different severity levels (REQUIRED, RECOMMENDED, OPTIONAL) and provides detailed information about what failed and why. It is designed to be extensible, allowing new profiles to be added by implementing SHACL shapes and Python validation logic.
Use it for:
- Validate research data packages before publishing to ensure metadata completeness and standards compliance.
- Integrate validation into a data management pipeline to catch metadata errors early in the workflow.
- Check workflow RO-Crates submitted to a workflow hub for conformance to the Workflow RO-Crate profile.
- Validate run crates to verify execution metadata is properly recorded.
- Programmatically validate RO-Crates in Python applications to enforce data quality gates.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Validates RO-Crate metadata packages against declared profiles using SHACL shapes and Python rules, supporting local directories, ZIP archives, and remote HTTP/HTTPS sources.
Yes. The package is actively maintained, has low install friction, carries a permissive Apache 2.0 license, and fills a specific need for RO-Crate validation. It supports both CLI and programmatic use, handles multiple storage backends, and is extensible for new profiles. No known vulnerabilities. Suitable for research data management and metadata compliance workflows.
Install
roc-validator on PyPI
pip
pip install roc-validatoruv
uv add roc-validatorpoetry
poetry add roc-validatorInstalling roc-validator
Before you install
Low friction: pure Python wheel with 11 runtime dependencies including click, colorlog, rdflib, pyshacl, requests, and rich—all standard, well-maintained packages. Active maintenance with a release 17 days ago.
License in practice
Apache License 2.0 (permissive): you can use, modify, and distribute this package freely in commercial or private projects, provided you include the license notice and state significant changes.
Quickstart
pip install roc-validator
from rocrate_validator import services, models
settings = services.ValidationSettings(
rocrate_uri='/path/to/ro-crate',
profile_identifier='ro-crate-1.1',
requirement_severity=models.Severity.REQUIRED,
)
result = services.validate(settings)
if result.has_issues():
for issue in result.get_issues():
print(f"{issue.severity.name}: {issue.message}")
Requires Python 3.10 or later.
Verify before relying
- Performance characteristics when validating large RO-Crates or remote archives over slow connections.
- Whether the extensibility framework for adding new profiles is documented with examples.
- Coverage of all declared profiles by SHACL shapes versus Python code checks.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 11 — click, colorlog, enum-tools, inquirerpy, pyshacl, rdflib, requests, requests-cache, rich, rich-click, toml |
| Maintenance | actively maintained — 17 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 111,154/month — #12,431 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: roc_validator-0.11.3-py3-none-any.whl
Keywords: RO-Crate, validation, metadata, research object, data management, scientific data, Python
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
repo2rocrateGenerates RO-Crate metadata from workflow…
permissive · top 15,000 on PyPI
rocraterocrate is a Python library for creating and…
permissive · top 15,000 on PyPI
pyshaclValidates RDF graphs against SHACL shape…
permissive · top 5,000 on PyPI
validator-collectionProvides 60+ validator functions for checking…
permissive · top 15,000 on PyPI
bdbagbdbag creates, validates, and manages BagIt…
permissive · top 15,000 on PyPI
eidoValidates project metadata against PEP schemas…
permissive · top 15,000 on PyPI
chia-rsProvides Python bindings to Rust crates for…
unclear · top 15,000 on PyPI
bagit-profileValidates BagIt bags against BagIt profile…
permissive · top 15,000 on PyPI
validate-pyprojectValidates pyproject.toml files against JSON…
copyleft · top 15,000 on PyPI
kubernetes-validateValidates Kubernetes resource definitions…
permissive · top 15,000 on PyPI