This repository was originally developed by Harold Solbrig and was kindly contributed
to the LinkML organization because of his retirement. All credit for the original development of this repository goes
to him.
Special note
Since development was taken over after a long time of no development, there are tests that are not passing.
The reasons are not always immediately clear, in some cases it is due to code not having been updated when dependencies
updated their versions. In other cases, there are genuine bugs that have not been fixed. The current release was
released in order to be able to support Python 3.14 in LinkML. Please get in touch by opening an issue if you
encounter any bugs.
Unfortunately, however, rdflib-jsonld is NOT compatible with the bleeding edge rdflib, so you can't use a json-ld parser in this situation.
shexeval CLI
> shexeval -h
usage: shexeval [-h] [-f FORMAT] [-s START] [-ut] [-sp STARTPREDICATE]
[-fn FOCUS] [-A] [-d] [-ss] [-cf] [-sq SPARQL] [-se]
[--stopafter STOPAFTER] [-ps] [-pr] [-gn GRAPHNAME] [-pb]
rdf shex
positional arguments:
rdf Input RDF file or SPARQL endpoint if slurper or sparql
options
shex ShEx specification
optional arguments:
-h, --help show this help message and exit
-f FORMAT, --format FORMAT
Input RDF Format
-s START, --start START
Start shape. If absent use ShEx start node.
-ut, --usetype Start shape is rdf:type of focus
-sp STARTPREDICATE, --startpredicate STARTPREDICATE
Start shape is object of this predicate
-fn FOCUS, --focus FOCUS
RDF focus node
-A, --allsubjects Evaluate all non-bnode subjects in the graph
-d, --debug Add debug output
-ss, --slurper Use SPARQL slurper graph
-cf, --flattener Use RDF Collections flattener graph
-sq SPARQL, --sparql SPARQL
SPARQL query to generate focus nodes
-se, --stoponerror Stop on an error
--stopafter STOPAFTER
Stop after N nodes
-ps, --printsparql Print SPARQL queries as they are executed
-pr, --printsparqlresults
Print SPARQL query and results
-gn GRAPHNAME, --graphname GRAPHNAME
Specific SPARQL graph to query - use '' for any named
graph
-pb, --persistbnodes Treat BNodes as persistent in SPARQL endpoint
(3) Uses manifest shapemap feature -- not yet implemented
(2) sht:relativeIRI -- this isn't a real problem, but we havent taken time to deal with this in the test harness
(6) rdflib has a parsing error when escaping single quotes. (Issue submitted, awaiting release)
As mentioned above, at the moment this is as literal an implementation of the specification as was sensible. This means, in particular, that we are less than clever when it comes to partition management.
Use together with PyShEx: extensions, drivers, servers and companion tools.
rdflibPythie’s Index: 65RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.18.8M downloads/mo