skillfed

types-orjson

Typing stubs for orjson

types-orjson v3.6.2 422.5K downloads/30d#6,781 on PyPI5,108
Permissive license Apache-2.0 license Active released

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-orjson

uv

uv add types-orjson

poetry

poetry add types-orjson

Installing 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

License :: OSI Approved :: Apache Software LicenseTyping :: Stubs Only

Tags

type stubs orjsonmypy type hints jsonorjson type checkingpep 561 stubsstatic type validation jsonorjson typing support
type-stubsdeprecated

More Software Development packages