jsonschema

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

Library
PyPI
v4.26.0
4,977stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
91/100Excellent
Development Activity100
Maintenance84
Community80
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
92/100Excellent
Architecture92
Code Quality94
Innovation92
Learning Curve85

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 25 apps in this directory

Python
66%
Apache 2.0

Agent Control

AI Agents

304

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
75
Repo Health
71
Technical
70
Dependency
Built with
Python66%
TypeScript33%
Updated 6 days ago
TypeScript
60%
Other

agenta

Developer Tools · Devops · AI Development

4,706

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
TypeScript60%
Python38%
Updated yesterday
Python
100%
Apache 2.0

Agno

Devops · AI Development · Automation

42,074

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
Python100%
Updated yesterday
Python
90%
Apache 2.0

Apache Airflow

Data Engineering

46,755

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
Python90%
Updated yesterday
Python
59%
Apache 2.0

argilla

AI Development · Data Engineering

5,098

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
Python59%
Jupyter Notebook21%
Updated 1 weeks ago
Python
67%
Other

AutoGPT

Automation · Productivity · AI Assistants

187,177

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
Python67%
TypeScript32%
Updated today
Python
83%
Other

Bugsink

Developer Tools · Monitoring

2,056

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
Python83%
HTML15%
Updated 3 days ago
Python
80%
Apache 2.0

changedetection.io

Monitoring

33,668

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
Python80%
Updated 3 days ago
Python
100%
Apache 2.0

ClearML

Devops · Automation

6,858

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

View details
95
Repo Health
79
Technical
67
Dependency
Built with
Python100%
Updated yesterday

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

Search