--- id: pyshexc version: "0.10.3.post1" license: MIT License license_treatment: permissive maintenance: active --- # PyShexC — PyShExC - Python ShEx compiler License: permissive · Maintenance: active · Downloads: 302.3K/mo ## 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 above — verify before relying. Parses Shape Expression Compact (ShExC) syntax into Python objects that can be serialized to ShEx JSON (ShExJ) or RDF (ShExR) formats, enabling programmatic validation and transformation of shape definitions. 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 pip install pyshexc uv add pyshexc poetry add pyshexc ## Installing PyShexC 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. 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()) Requires Python 3.10 or later. 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_current - Install friction: low - Maintenance: active - Downloads: 302.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags shex parser python, shexc to shexj converter, shape expression compiler, rdf shape validation, shex json serialization, rdf-semantic-web, schema-validation, compiler [View on SkillFed](https://skillfed.io/packages/pyshexc) · [View on PyPI](https://pypi.org/project/pyshexc/)