jsonschema

The reference implementation of JSON Schema validation for Python, supporting every draft from 3 to 2020-12.

Library
PyPI
v4.26.0
4,986 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
90 /100 Excellent
Development Activity 96
Maintenance 84
Community 80
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
92 /100 Excellent
Architecture 92
Code Quality 94
Innovation 92
Learning Curve 85

jsonschema is the de facto standard library for validating JSON data against JSON Schema documents in Python. It ships full support for Drafts 2020-12, 2019-09, 7, 6, 4, and 3, exposing both a one-line validate() helper and per-draft validator classes for fine-grained control.

Beyond simple pass/fail checks, it offers lazy validation that iteratively reports every error in an instance, programmatic querying of which properties failed, custom type and format checkers, and pluggable reference resolution. It underpins a huge swath of the Python ecosystem, from API frameworks to configuration tooling.

What You Get

  • A single validate() entry point plus dedicated validator classes for JSON Schema Drafts 3, 4, 6, 7, 2019-09, and 2020-12
  • Lazy validation via iter_errors() that reports every validation failure instead of stopping at the first
  • Rich, introspectable ValidationError and ErrorTree objects that pinpoint which schema keyword and instance path failed
  • Optional format validation (email, uri, date-time, and more) through installable format and format-nongpl extras
  • Extensibility hooks for custom validators, type checkers, and reference resolution built on the referencing library

Common Use Cases

  • Validating incoming API request or response bodies against a schema contract
  • Checking configuration files and structured data before an application consumes them
  • Enforcing data quality in ETL and ingestion pipelines
  • Building higher-level validation frameworks and code generators on top of a spec-compliant core

Under The Hood

Architecture - Validator classes are not hand-written per draft but generated at import time by validators.create(), which binds a version-specific meta-schema, a type checker, a format checker, and a mapping of schema keywords (in _keywords.py and _legacy_keywords.py) to validation functions; each keyword function yields ValidationError objects, so validation is a lazy generator pipeline that iter_errors() drains and validate() consumes only far enough to raise the first error. $ref and $dynamicRef resolution is delegated to the external referencing library and jsonschema-specifications, keeping schema loading and the validation core cleanly separated.

Tech Stack - Pure Python targeting 3.10+, built with hatchling and hatch-vcs for versioning. Runtime dependencies are deliberately lean: attrs for the frozen validator classes, referencing and jsonschema-specifications for schema/registry handling, and rpds-py for persistent immutable data structures. Optional format and format-nongpl extras pull in focused validators (fqdn, idna, rfc3339-validator, uri_template, webcolors) only when semantic format checking is needed. Testing and benchmarking run through nox and pyperf.

Code Quality - The test suite is larger than the source (roughly 5,900 lines of tests against 4,600 of implementation) and is anchored by test_jsonschema_test_suite.py, which runs the official cross-language JSON Schema conformance suite. The codebase uses modern typing throughout, exposes runtime_checkable Protocol definitions in protocols.py, and handles backward compatibility gracefully via module-level getattr hooks that emit DeprecationWarnings rather than breaking imports.

API Design - The public surface is deliberately layered for progressive disclosure: validate(instance, schema) is a one-liner for the common case, while Draft202012Validator and its siblings expose is_valid(), iter_errors(), and check_schema() for callers who need all errors or a specific draft. Errors are first-class objects with json_path, absolute_path, and an ErrorTree view, making programmatic failure handling ergonomic. Extensive Read the Docs documentation and inline examples keep the learning curve gentle for a spec as intricate as JSON Schema.

Used by 27 apps in this directory

Python
67%
Apache 2.0

Agent Control

AI Agents

314

An open-source runtime control plane for AI agents — define safety guardrails once, apply them across agents built on LangChain, CrewAI, Google ADK, or AWS Strands, and update controls without redeploying code.

View details
74
Repo Health
71
Technical
67
Dependency
Built with
Python 67%
TypeScript 32%
Updated 4 days ago
TypeScript
56%
Other

agenta

AI Development · Developer Tools · Devops

4,788

The open-source LLMOps platform unifying prompt engineering, evaluation, and observability for teams building reliable LLM applications.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
TypeScript 56%
Python 39%
Updated 5 days ago
Python
100%
Apache 2.0

Agno

AI Development · Automation · Devops

42,358

Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.

View details
93
Repo Health
87
Technical
66
Dependency
Built with
Python 100%
Updated 4 days ago
Python
89%
Apache 2.0

Apache Airflow

Data Engineering

46,995

Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.

View details
96
Repo Health
89
Technical
64
Dependency
Built with
Python 89%
Updated 4 days ago
Python
59%
Apache 2.0

argilla

AI Development · Data Engineering

5,125

Collaborate on high-quality AI training data with a self-hosted annotation platform built for LLMs, NLP, and multimodal models.

View details
65
Repo Health
81
Technical
61
Dependency
Built with
Python 59%
Jupyter Notebook 21%
Updated 1 weeks ago
Python
66%
Other

AutoGPT

AI Assistants · Automation · Productivity

187,596

Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.

View details
93
Repo Health
78
Technical
66
Dependency
Built with
Python 66%
TypeScript 33%
Updated 4 days ago
Python
84%
Other

Bugsink

Developer Tools · Monitoring

2,095

Self-hosted error tracking that accepts Sentry SDKs out of the box, so you keep your instrumentation and drop the monthly bill.

View details
84
Repo Health
80
Technical
71
Dependency
Built with
Python 84%
HTML 14%
Updated 1 weeks ago
Python
79%
Apache 2.0

changedetection.io

Monitoring

34,605

Self-hosted website change detection with AI-powered smart alerts, browser automation, price tracking, and 85+ notification channels.

View details
91
Repo Health
80
Technical
68
Dependency
Built with
Python 79%
Updated 1 weeks ago
Python
100%
Apache 2.0

ClearML

Automation · Devops

6,892

Auto-magical MLOps platform that tracks experiments, versions data, orchestrates pipelines, and serves models with just two lines of code.

View details
94
Repo Health
79
Technical
68
Dependency
Built with
Python 100%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers