oxigraph ( https://github.com/oxigraph/oxigraph ) ! (also you may find related project interesting https://crates.io/crates/reasonable )
And btw. it looks like rdflib-endpoint (mentioned earlier) can via rdflib-endpoint --store Oxigraph ...
be configured to use oxigraph!
cargo install oxigraph_server
mkdir -p oxigraph_data
oxigraph_server --location oxigraph_data load -f example.ttl
oxigraph_server --location oxigraph_data serve
And you can check it in browser (probably on http://localhost:7878/ ) or form command line:
curl -G 'http://localhost:7878/query' --data-urlencode "query=PREFIX rdf:
<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?sub ?pred ?obj WHERE {
?sub ?pred ?obj .
} LIMIT 10" -H "Accept: application/sparql-results+json"|jq
copy from https://crates.io/crates/oxigraph_server#usage
Run oxigraph_server --location my_data_storage_directory serve
to start the server where my_data_storage_directory
is the directory where you want Oxigraph data to be stored. It listens by default on localhost:7878
.
The server provides an HTML UI, based on YASGUI, with a form to execute SPARQL requests.
OR
Via Docker:
Copy from https://crates.io/crates/oxigraph_server#using-a-docker-image :
docker run --rm ghcr.io/oxigraph/oxigraph --help
Expose the server on port 7878
of the host machine, and save data on the local ./data
folder
docker run --rm -v $PWD/data:/data -p 7878:7878 ghcr.io/oxigraph/oxigraph --location /data serve --bind 0.0.0.0:7878
https://stackoverflow.com/a/77737438/544721
You can then access it from your machine on port 7878
:
# Open the GUI in a browser
firefox http://localhost:7878
# Post some data
curl http://localhost:7878/store?default -H 'Content-Type: text/turtle' -T ./data.ttl
# Make a query
curl -X POST -H 'Accept: application/sparql-results+json' -H 'Content-Type: application/sparql-query' --data 'SELECT * WHERE { ?s ?p ?o } LIMIT 10' http://localhost:7878/query
# Make an UPDATE
curl -X POST -H 'Content-Type: application/sparql-update' --data 'DELETE WHERE { <http://example.com/s> ?p ?o }' http://localhost:7878/update
Useful frontent: https://github.com/TriplyDB/Yasgui