Shifty
Shifty validates RDF graphs against SHACL shapes and runs SHACL-AF rules to a fixed point. It compiles shapes into a path and shape algebra before evaluating data. The engine is available through a command-line tool, Python package, C++17 SDK, Rust crates, and WebAssembly module.
Documentation · Feature support · Changelog
Quick start
Install the Python package and its optional rdflib dependency when you want a
W3C sh:ValidationReport graph:
=
=
=
assert not
assert == 1
, , =
assert not
validate_algebra() returns structured violations. validate() returns the
W3C report as an rdflib.Graph. The Python reference
lists their options and the other graph input forms.
For the CLI, clone this repository and install the binary with Rust:
The CLI's default validation output groups failures by finding and lists the
affected focus nodes. --report emits a W3C report in Turtle. See the
CLI reference for flags and output
formats.
Interfaces
| Interface | Use |
|---|---|
| Python | Validation, inference, evidence, shape maps, and prepared schemas. |
| CLI | Validation and inference from files or URLs. |
| C++17 | Static library with prepared validation and typed results. |
| Rust | Engine crates and reusable sessions. |
| WebAssembly | Local browser validation and inference; try the playground. |
SHACL Core and much of SHACL-AF are supported. JavaScript constraints and functions are unsupported; some calls to SHACL functions from SPARQL have limited graph access. Check the feature matrix before relying on an advanced feature. Symbolic repair is experimental.
Development
The contribution guide has build and
quality checks. Python development uses the locked uv environment in python/:
Reinstall the editable package after changing Rust sources so tests use the
newly compiled extension. For performance measurements and implementation
comparisons, see benchmark/README.md and
scripts/compare_implementations.py.
The archive-first-attempt branch preserves the older implementation published
as Shifty 0.0.7. The current project was developed predominantly with coding
assistants, including Claude Opus 4.8, Sonnet 4.6, and ChatGPT 5.5.
License
BSD-3-Clause.