PyShexC
PyShExC - Python ShEx compiler
Decision gist · record as of 2026-08-14
Yes, if you need to parse or transform ShEx shape definitions in Python. The package is actively maintained, has low install friction, carries no security vulnerabilities, and supports current Python versions (3.10–3.14). The MIT license imposes no restrictions. Install only if you are working with ShEx schemas; it is a specialized tool with no general-purpose utility.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low install friction with a pure-Python wheel distribution.
- Actively maintained as of the latest release, with support for modern Python versions (3.10–3.14).
License · maintenance · safety
MIT License (permissive) — MIT License permits commercial and private use with minimal restrictions; attribution required but no copyleft obligations.
last release 2026-05-01 (105 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 302,316 downloads/mo, #7,825 on PyPI
Alternatives
Verify before relying
pip install PyShExC
from pyshexc import ShExC
parser = ShExC()
shex_obj = parser.parse_file('schema.shex')
print(shex_obj.to_json())- Whether the package is actively maintained by LinkML organization or if it remains a one-time fork for Python 3.14 support only.
- Performance characteristics when parsing large or complex ShExC schemas.
- Completeness of ShEx 2.1 specification coverage beyond the test suite mentioned.
What it is and what it does
PyShExC is a Python compiler for the Shape Expression Compact (ShExC) syntax, originally developed by Eric Prud'hommeaux and now maintained in the LinkML organization. It parses ShExC text into pyjsg Python objects, which can then be serialized to ShEx JSON (ShExJ) or RDF (ShExR) representations. The package is designed for developers who need to work with shape definitions programmatically—either to validate RDF data against shape constraints, transform between ShEx formats, or build ShEx-based tools.
The package includes a command-line tool (shexc_to_shexj) for converting ShExC files to JSON and RDF outputs, plus a Python API for programmatic access. It depends on ANTLR4 for parsing, rdflib-shim for RDF operations, and several related libraries (jsonasobj, pyjsg, shexjsg) that handle the object model and JSON schema bindings. The fork was created to enable Python 3.14 support in LinkML after the original repository became inactive.
Use it for
- Convert ShExC shape definitions to ShEx JSON format for use in web applications or APIs.
- Programmatically validate RDF graphs against shape constraints by parsing ShExC schemas.
- Transform shape definitions between ShExC, ShExJ, and ShExR formats in data pipeline tools.
- Build custom ShEx interpreters or validators that require parsed shape objects as input.
- Integrate shape validation into linked data workflows that use Python.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to parse or transform ShEx shape definitions in Python.
The package is actively maintained, has low install friction, carries no security vulnerabilities, and supports current Python versions (3.10–3.14). The MIT license imposes no restrictions. Install only if you are working with ShEx schemas; it is a specialized tool with no general-purpose utility.
Install
pyshexc on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained as of the latest release, with support for modern Python versions (3.10–3.14). Six runtime dependencies are all standard ecosystem packages.
Requires Python 3.10 or later.
License in practice
MIT License permits commercial and private use with minimal restrictions; attribution required but no copyleft obligations.
Quickstart
pip install PyShExC
from pyshexc import ShExC
parser = ShExC()
shex_obj = parser.parse_file('schema.shex')
print(shex_obj.to_json())
Verify before relying
- Whether the package is actively maintained by LinkML organization or if it remains a one-time fork for Python 3.14 support only.
- Performance characteristics when parsing large or complex ShExC schemas.
- Completeness of ShEx 2.1 specification coverage beyond the test suite mentioned.
Package facts
| License | MIT License permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesantlr4-python3-runtimechardetjsonasobjpyjsgrdflib-shimshexjsg |
| Maintenance | Actively maintained 105 days since the last release |
| First released | |
| Downloads | 302,316 / month, #7,825 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming 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: pyshexc-0.10.3.post1-py3-none-any.whl
Tags
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 › “shexc to shexj converter”
- PyShexCParses Shape Expression Compact (ShExC) syntax into Python objects…
- PyShExPyShEx parses and validates RDF data against Shape Expressions (ShEx)…
- ShExJSGShExJSG provides a Python object model for the ShEx 2.0 Shape…
Give your agent the search over MCP, or paste the wish link into any chat.
More Compilers packages
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.
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.
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.
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.
Python bindings to the tree-sitter parsing library, enabling incremental parsing and syntax tree analysis for source code.
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.
See also PyShEx · ShExJSG · PyJSG · pyshacl · rdflib-jsonld · rdflib · xmlschema · extruct · xsdata-pydantic · sssom