types-orjson
Typing stubs for orjson
What it is and what it does
types-orjson is a PEP 561 type stub package that provides type hints for the orjson JSON serialization library. It allows static type checkers such as mypy, PyCharm, and pytype to understand and validate the types of orjson's functions and return values when analyzing your code. This is useful for catching type errors before runtime and improving IDE autocompletion.
However, the package is now largely superseded: orjson has included its own type annotations since version 3.6.1, making this stub package redundant for users on current orjson versions. The stub package itself has not been updated since January 2022 and relies on typeshed as its source, so it may lag behind orjson's actual API.
Use it for:
- Type-checking legacy code that uses orjson versions older than 3.6.1 with mypy or similar tools.
- Ensuring IDE autocompletion and type hints work correctly in projects locked to older orjson releases.
- Validating orjson usage in a codebase where the type checker does not yet recognize orjson's built-in stubs.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides PEP 561 type stubs for the orjson package, enabling type checkers like mypy and PyCharm to validate code using orjson.
No, unless you are using orjson older than 3.6.1. For orjson 3.6.1 and later, uninstall this package and rely on orjson's built-in type stubs instead. The package has not been updated in over 1680 days and is explicitly marked as obsolete by its own documentation.
Install
types-orjson on PyPI
pip
pip install types-orjsonuv
uv add types-orjsonpoetry
poetry add types-orjsonInstalling types-orjson
Before you install
Low friction installation with no runtime dependencies. However, the package has not been updated since January 2022 (over 1680 days ago), and the description notes that orjson has included its own type annotations since version 3.6.1, making this stub package potentially obsolete for recent orjson versions.
License in practice
Licensed under Apache-2.0, a permissive license that allows free use, modification, and distribution with minimal restrictions—suitable for development and commercial projects.
Quickstart
pip install types-orjson
# Then use with type checker (e.g., mypy)
# mypy will now recognize orjson types in your code
import orjson
data = orjson.dumps({"key": "value"})
Only useful if you are using orjson versions older than 3.6.1; orjson 3.6.1+ includes its own type stubs, making this package redundant.
Verify before relying
- Whether this stub package remains compatible with current orjson releases and whether type checkers still prefer it over orjson's built-in stubs.
- Whether the package will receive updates to match orjson's API evolution since its last release in January 2022.
Package facts
| License | Apache-2.0 license (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 1,680 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 422,513/month — #6,781 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_orjson-3.6.2-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-attrsProvides PEP 561 type stubs for the attrs…
permissive · top 15,000 on PyPI
types-clickProvides PEP 561 type stubs for the click…
permissive · top 5,000 on PyPI
types-cryptographyProvides PEP 561 type stubs for the…
permissive · top 5,000 on PyPI
types-jwtProvides type stubs for the jwt package,…
permissive · top 15,000 on PyPI
types-tornadoProvides PEP 561 type stubs for tornado,…
permissive · top 15,000 on PyPI
types-WerkzeugProvides PEP 561 type stubs for Werkzeug,…
permissive · top 5,000 on PyPI
types-freezegunProvides type stubs for the freezegun…
permissive · top 5,000 on PyPI
types-Jinja2Provides PEP 561 type stubs for Jinja2,…
permissive · top 5,000 on PyPI
types-backportsProvides PEP 561 type stubs for the backports…
permissive · top 15,000 on PyPI
types-FlaskProvides PEP 561 type stubs for Flask to enable…
permissive · top 5,000 on PyPI