$npx skillfedfor your agent

PyShEx

Python ShEx interpreter

With conditionsPyPI CompilersReleased May 2026302.6K downloads / moCC0 1.0 UniversalPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pyshex-0.9.0-py3-none-any.whl
v0.9.0 · released 2026-05-07 · Python >=3.10 · 9 runtime deps: cfgraph, chardet, pyshexc, rdflib-shim, requests, shexjsg, sparqlslurper, sparqlwrapper

Yes, with conditions. Install if you need to validate RDF against ShEx schemas and can tolerate that some unit tests are failing due to a long maintenance gap. The package is actively maintained now and supports current Python versions (3.10–3.14), but review the open issues and test manifest before relying on complex or edge-case validation logic. No known security vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • If using JSON-LD parsing, note that rdflib-jsonld is incompatible with the bleeding-edge rdflib version needed for single-quote escaping in RDF literals.
  • Low install friction with a pure-Python wheel.

License · maintenance · safety

CC0 1.0 Universal (permissive) — Licensed under CC0 1.0 Universal (public domain dedication), placing no restrictions on use, modification, or distribution for any purpose.

last release 2026-05-07 (99 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 302,591 downloads/mo, #7,820 on PyPI

Verify before relying

pip install PyShEx

from pyshex.shex_evaluator import ShExEvaluator

evaluator = ShExEvaluator(rdf='data.ttl', shex='schema.shex')
result = evaluator.evaluate()
  • Whether all 81 skipped tests in the official test suite (52 bnode identity, 18 ShEx 2.1 IMPORT, 3 shapemap, 2 relative IRI, 6 rdflib quote escaping) affect real-world use cases.
  • Current status of the rdflib single-quote escaping issue and whether a workaround is available without using bleeding-edge rdflib.
  • Which specific unit tests are failing and whether they impact the validation semantics or only edge cases.
Same gist for agents: .md · .json

What it is and what it does

PyShEx is a Python implementation of the Shape Expressions Language 2.0 specification, allowing you to parse ShEx schemas (in both ShExC and ShExJ formats) and validate RDF graphs against them. It determines whether RDF nodes and their properties conform to the structural and type constraints defined in a ShEx schema, supporting features like SPARQL-based focus node selection, RDF Collections flattening, and detailed validation reporting.

The package wraps the formal ShEx specification closely in Python code, translating semantic rules directly into executable logic. It includes a command-line tool (shexeval) for batch validation and integrates with rdflib for RDF parsing and SPARQL endpoints. The package depends on ShExJSG for AST representation, pyshexc for ShExC parsing, and several RDF utilities (rdflib-shim, sparqlwrapper, sparqlslurper) to handle diverse RDF sources and query patterns.

Use it for

  • Validate RDF data against organizational or domain-specific shape constraints before ingesting into a knowledge graph.
  • Test RDF export pipelines to ensure generated triples conform to expected structural schemas.
  • Query SPARQL endpoints and validate the results against ShEx schemas in a single workflow.
  • Batch-validate large RDF files or multiple datasets using the shexeval CLI with focus node selection by type or predicate.
  • Integrate shape validation into linked data publishing pipelines to catch schema violations early.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, with conditions.

Install if you need to validate RDF against ShEx schemas and can tolerate that some unit tests are failing due to a long maintenance gap. The package is actively maintained now and supports current Python versions (3.10–3.14), but review the open issues and test manifest before relying on complex or edge-case validation logic. No known security vulnerabilities.

Install

pyshex on PyPI

Before you install

Low install friction with a pure-Python wheel. Maintenance is active but the package carries a caveat: the current release was issued to support Python 3.14 after a long development hiatus, and some unit tests remain failing due to outdated code or genuine bugs—consult issues before relying on edge cases.

Requires Python 3.10 or later. If using JSON-LD parsing, note that rdflib-jsonld is incompatible with the bleeding-edge rdflib version needed for single-quote escaping in RDF literals.

License in practice

Licensed under CC0 1.0 Universal (public domain dedication), placing no restrictions on use, modification, or distribution for any purpose.

Quickstart

pip install PyShEx

from pyshex.shex_evaluator import ShExEvaluator

evaluator = ShExEvaluator(rdf='data.ttl', shex='schema.shex')
result = evaluator.evaluate()

Verify before relying

  • Whether all 81 skipped tests in the official test suite (52 bnode identity, 18 ShEx 2.1 IMPORT, 3 shapemap, 2 relative IRI, 6 rdflib quote escaping) affect real-world use cases.
  • Current status of the rdflib single-quote escaping issue and whether a workaround is available without using bleeding-edge rdflib.
  • Which specific unit tests are failing and whether they impact the validation semantics or only edge cases.

Package facts

LicenseCC0 1.0 Universal permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
9 packages
cfgraphchardetpyshexcrdflib-shimrequestsshexjsgsparqlslurpersparqlwrapperurllib3
MaintenanceActively maintained 99 days since the last release
First released
Downloads302,591 / month, #7,820 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: CC0 1.0 Universal (CC0 1.0) Public Domain DedicationProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Compilers

Evidence: pyshex-0.9.0-py3-none-any.whl

Tags

Capabilities
ShEx validation RDFshape expressions interpreterRDF schema validationShEx parser PythonRDF graph validationShEx 2.0 implementationsemantic web validation
Topics
rdf-validationsemantic-webschema-validation
PyPI keywords
ShExrdf

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “ShEx validation RDF”

  • PyShExPyShEx parses and validates RDF data against Shape Expressions (ShEx)…
  • ShExJSGShExJSG provides a Python object model for the ShEx 2.0 Shape…
  • PyShexCParses Shape Expression Compact (ShExC) syntax into Python objects…

Give your agent the search over MCP, or paste the wish link into any chat.

More Compilers packages

pyparsing Worth it
PyPI · Text Processing · released Jan 2026

pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.

Install it if you need to parse text or define grammars programmatically.

MITpure Python · 3.9+
412.7Mdownloads / mo
Cython Worth it
PyPI · Python Modules · released Jul 2026

Cython is a source code translator that compiles Python code to C, enabling optional static typing and direct C/C++ interoperability to generate efficient native extensions.

Install it if you need to optimize Python performance, wrap C/C++ libraries, or build fast native extensions.

permissive licensepure Python · 3.8+
136.1Mdownloads / mo
asttokens Worth it
PyPI · Python Modules · released Jul 2026

Annotates Python abstract syntax trees with the positions of tokens and source code text, enabling tools to map AST nodes back to their originating code for refactoring, analysis, and transformation.

permissive licensepure Python · 3.8+
134.8Mdownloads / mo
numba Unrated
PyPI · Compilers · released Aug 2026

Numba is a just-in-time compiler that accelerates numerically-focused Python code by compiling it to machine code via LLVM, with support for NumPy functions, loop parallelization, and GPU code generation.

BSD-3-Clausecompiled wheel · 3.10+
86.0Mdownloads / mo
tree-sitter Worth it
PyPI · Linguistic · released Jun 2026

Python bindings to the tree-sitter parsing library, enabling incremental parsing and syntax tree analysis for source code.

MITcompiled wheel · 3.10+
79.0Mdownloads / mo
llvmlite With conditions
PyPI · Code Generators · released Aug 2026

llvmlite provides a lightweight Python binding to LLVM's IR builder, optimizer, and JIT compiler APIs, enabling you to write JIT compilers and code generators without needing the full LLVM C++ API surface.

BSD-2-Clause AND Apache-2.0 WITH LLVM-exceptioncompiled wheel · 3.10+
69.3Mdownloads / mo

See also PyShexC · ShExJSG · rdflib · pyshacl · CFGraph · linkml · pymantic · owlrl · pyrdfa3 · sssom