Notes from the research and development process.
Specifications:
Implementations:
- pySHACL
shacl-js(unmaintained)- rdf-validate-shacl
- shacl-engine (also JavaScript)
Other:
- SHACL playground (no SPARQL support)
- rdf-validate-shacl playground
- SHACL Play!
- Book: Validating RDF Data
pySHACL can be installed from PyPI:
pip install 'pyshacl[js]'
# or
pipx install 'pyshacl[js]'
It can be used to validate a data graph data.ttl
against a SHACL shapes graph shapes.ttl
like so:
pyshacl --metashacl --imports --js -s shapes.ttl data.ttl
The --metashacl
flag validates the shapes graph, first.
The --imports
flag is required in order for pySHACL to resolve owl:imports
properties.
The --js
flag enables JavaScript functionality.
pySHACL can also be used as a library.