orjson
A fast, correct, Rust-backed JSON library for Python with native dataclass, datetime, and numpy support
Repository Health
Technical Analysis
orjson is a fast, correct JSON library for Python, implemented in Rust and exposed via PyO3 bindings. It benchmarks as the fastest Python JSON library and serializes dataclass, datetime, numpy, and UUID instances natively, without needing a custom default handler for the common cases most projects hit.
orjson.dumps() is roughly 10x faster than the standard library’s json module and orjson.loads() roughly 2x faster, while staying strictly compliant with UTF-8 and RFC 8259. It intentionally does not provide file I/O or line-delimited JSON helpers, keeping its scope to serialization/deserialization only, and treats adding an implicit serialization for a new type without an opt-in flag as a breaking change under its semver policy.
What You Get
- A
dumps/loadsAPI that is a near drop-in replacement for the standard libraryjsonmodule - Native serialization of dataclasses, datetime/date/time objects, numpy arrays, and UUIDs without a custom
defaultfunction - Strict RFC 8259 and UTF-8 compliant deserialization, more correct than
jsonor most third-party alternatives - Prebuilt wheels for amd64/arm64/ppc64le/s390x across Linux, macOS, and Windows, with AVX-512 runtime acceleration when available
- A stable semver policy where any new implicit type serialization is treated as a breaking change
Common Use Cases
- Speeding up API response serialization in high-throughput Python web services
- Serializing dataclass-based domain models directly to JSON without writing custom encoders
- Working with numpy-heavy data pipelines that need fast JSON I/O for arrays
- Replacing
json.dumps/json.loadscalls in performance-sensitive code paths with minimal migration effort
Under The Hood
Architecture - orjson is a thin Python-facing API (pysrc/) over a Rust core (src/) split into serialize and deserialize modules plus ffi glue and a typeref.rs module that caches references to Python type objects (dataclass, datetime, UUID, numpy) to avoid repeated attribute lookups on the hot path; PyO3 handles the CPython/Rust boundary. Tech Stack - Rust (Cargo.toml/Cargo.lock pin the toolchain and dependencies) built via build.rs into a CPython extension module, published as prebuilt wheels for CPython 3.10-3.15 across six CPU architectures and three OSes. Code Quality - the test/ directory contains 34 Python test modules covering dataclasses, datetime, numpy, UUID, fragments, and option flags, plus a bench benchmark suite comparing against json and other libraries; the project has no public issue tracker (by design, to reduce noise) which means quality is enforced primarily through the maintainer’s own test/benchmark discipline rather than community triage. API Design - the dumps/loads surface intentionally mirrors the standard library’s json module for near drop-in migration, while option flags (rather than kwargs sprawl) control serialization behavior like non-str keys, UTC handling, and numpy array support, keeping the public API small and stable under its semver-as-breaking-change policy.
Used by 18 apps in this directory
agenta
Developer Tools · Devops · AI Development
The open-source LLMOps platform unifying prompt engineering, evaluation, and observability for teams building reliable LLM applications.
Agno
Devops · AI Development · Automation
Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.
AutoGPT
Automation · Productivity · AI Assistants
Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.
changedetection.io
Monitoring
Self-hosted website change detection with AI-powered smart alerts, browser automation, price tracking, and 85+ notification channels.
GPT Researcher
Productivity · AI Assistants
The pioneering open-source autonomous AI agent that conducts deep, multi-source research and produces citation-backed reports exceeding 2,000 words — faster and more reliably than any human researcher.
headroom
AI Development · Developer Tools
Compress everything your AI agent reads — tool outputs, logs, RAG chunks, and files — before it reaches the LLM, achieving 60–95% fewer tokens with the same answers.
highlight.io
Developer Tools · Analytics · Monitoring
Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.
ktx
Data Engineering · Analytics · AI Development
ktx builds a self-improving context layer over your data warehouse so AI agents like Claude Code and Codex query it with approved metric definitions instead of reinventing SQL logic from scratch.
Langflow
AI Agents · AI Development
Build, test, and deploy AI agents and RAG workflows visually with native API and MCP server export.