Skip to content

Python implementation of SHACL2SPARQL

License

Notifications You must be signed in to change notification settings

SDM-TIB/SHACL2SPARQLpy

Repository files navigation

Latest Release License: MIT

Python Versions Package Format Package Status Package Version

SHACL2SPARQLpy

SHACL2SPARQLpy is a Python-based reference implementation of SHACL2SPARQL.

First, install the required dependencies:

python3 -m pip install -r requirements.txt

Assuming you have a SPARQL endpoint running under http://localhost:14000/sparql, you can execute the tool with the following command:

python3 main.py -d path/to/your/shacl/shapes http://localhost:14000/sparql /path/where/to/store/output

Note

The reference implementation was used in the WWW '21 paper of Trav-SHACL. It is not a fully functional Python version of SHACL2SPARQL. For example, it assumes that all shapes have a target definition. It merely served to make SHACL2SPARQL and Trav-SHACL comparable by getting rid of the performance difference in Python and Java.