--- id: shexjsg version: "0.9.0" license: CC0 1.0 Universal license_treatment: permissive maintenance: active --- # ShExJSG — ShExJSG - Astract Syntax Tree Definition for the ShEx 2.0 language License: permissive · Maintenance: active · Downloads: 290.4K/mo ## What it is and what it does ShExJSG is a Python library that implements the ShEx 2.0 Abstract Syntax Tree specification, letting you work with Shape Expressions—a language for validating RDF graph structure—as native Python objects. It was originally developed by Harold Solbrig and contributed to the LinkML organization. The library lets you construct ShEx schemas programmatically, validate them, and serialize them to JSON or other formats. It depends on pyjsg, a code generator that produces Python classes from JSG (JSON Schema Grammar) specifications. The package is actively maintained, supports Python 3.10 through 3.14, and carries no known security vulnerabilities. Use it for: - Build ShEx schemas programmatically in Python instead of writing raw JSON or ShExC syntax. - Validate RDF graph structures against shape constraints defined in ShEx. - Convert between ShEx representations (Python objects, JSON, ShExC text format). - Integrate ShEx validation into semantic web or linked data processing pipelines. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. ShExJSG provides a Python object model for the ShEx 2.0 Shape Expression language, allowing you to programmatically construct, validate, and serialize ShEx schemas as Python objects. Yes, if you work with ShEx or RDF shape validation in Python. Low install friction, permissive license, active maintenance, and no known vulnerabilities make it a straightforward choice. The single dependency (pyjsg) is the only risk surface; verify its stability for your use case. ## Install pip install shexjsg uv add shexjsg poetry add shexjsg ## Installing ShExJSG Before you install: Low friction: pure Python wheel with a single runtime dependency (pyjsg). Actively maintained with a recent release; requires Python 3.10 or later. License in practice: Licensed under CC0 1.0 Universal (public domain dedication), permissive treatment means you can use, modify, and distribute freely with no attribution requirement. Quickstart: from ShExJSG import Schema, ShExJ from pyjsg.jsglib.loader import is_valid schema = Schema() schema.start = ShExJ.Shape() print(is_valid(schema)) print(schema._as_json_dumps()) Requires Python 3.10 or later. Verify before relying: - Whether pyjsg itself has known vulnerabilities or maintenance issues that would affect this package's reliability. - Whether the circular dev dependency (pyshexc) documented in the README affects production use or only development workflows. ## Package facts - License: CC0 1.0 Universal (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 290.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags shex schema python ast, shape expression language, shex validation python, semantic web schema, rdf shape constraints, semantic-web, rdf, schema-validation [View on SkillFed](https://skillfed.io/packages/shexjsg) · [View on PyPI](https://pypi.org/project/shexjsg/)