ShExJSG
ShExJSG - Astract Syntax Tree Definition for the ShEx 2.0 language
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: pure Python wheel with a single runtime dependency (pyjsg).
- Actively maintained with a recent release; requires Python 3.10 or later.
License · maintenance · safety
CC0 1.0 Universal (permissive) — Licensed under CC0 1.0 Universal (public domain dedication), permissive treatment means you can use, modify, and distribute freely with no attribution requirement.
last release 2026-05-04 (102 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 290,446 downloads/mo, #7,989 on PyPI
Alternatives
Verify before relying
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())- 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.
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 on this page. Verify before relying on it.
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
shexjsg on PyPI
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.
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())
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 the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepyjsg |
| Maintenance | Actively maintained 102 days since the last release |
| First released | |
| Downloads | 290,446 / month, #7,989 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 :: 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: shexjsg-0.9.0-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 › “shex schema python ast”
- ShExJSGShExJSG provides a Python object model for the ShEx 2.0 Shape…
- PyShExPyShEx parses and validates RDF data against Shape Expressions (ShEx)…
- 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 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 PyJSG · PyShEx · PyShexC · linkml · pyshacl · jsonasobj · jsonasobj2 · sssom · linkml-runtime