--- id: types-orjson version: "3.6.2" license: Apache-2.0 license license_treatment: permissive maintenance: active --- # types-orjson — Typing stubs for orjson License: permissive · Maintenance: active · Downloads: 422.5K/mo ## 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 above — 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 pip install types-orjson uv add types-orjson 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: unspecified - Install friction: low - Maintenance: active - Downloads: 422.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs orjson, mypy type hints json, orjson type checking, pep 561 stubs, static type validation json, orjson typing support, type-stubs, deprecated [View on SkillFed](https://skillfed.io/packages/types-orjson) · [View on PyPI](https://pypi.org/project/types-orjson/)