{"library":"pyshex","title":"PyShEx","description":"Python implementation of the Shape Expressions (ShEx) language, used for validating RDF data against shape schemas. Current version 0.8.1, requires Python >=3.6, supports rdflib 5 and 6. Release cadence is sparse (major updates every few months).","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install pyshex"],"cli":{"name":"pyshex","version":"sh: 1: pyshex: not found"}},"imports":["from pyshex import ShExEvaluator","from pyshex import ShexMaker"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from pyshex import ShExEvaluator\nfrom rdflib import Graph\n\ng = Graph()\ng.parse(\"example.ttl\", format=\"turtle\")\n\nshapes = \"\"\"PREFIX ex: <http://example.org/>\nex:UserShape {\n  ex:name xsd:string ;\n  ex:age xsd:integer\n}\"\"\"\n\nevaluator = ShExEvaluator(rdf_graph=g, schema=shapes, focus=\"http://example.org/user1\")\nresult = evaluator.evaluate()\nprint(result)","lang":"python","description":"Basic usage: parse an RDF graph, define a ShEx schema, and evaluate whether a node conforms.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}