types-chardet
Typing stubs for chardet
What it is and what it does
types-chardet is a PEP 561 type stub package that provides type information for character encoding detection. It allows static type checkers like mypy, pyright, and pytype to understand and validate code that uses the underlying library, catching type errors before runtime.
The package is maintained as part of the typeshed project and has no runtime dependencies. However, the description explicitly notes that the underlying library includes type annotations or type stubs since version 5.1.0, and recommends uninstalling this package if using that version or later. The package has not been updated since 2023-05-10.
Use it for:
- Enable type checkers to validate code using character encoding detection in projects locked to pre-5.1.0 versions.
- Provide IDE autocomplete and type hints for encoding detection function calls in editors like PyCharm with older library versions.
- Satisfy type-checking CI pipelines requiring full type coverage for all dependencies on pre-5.1.0 versions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for character encoding detection, enabling static type checkers like mypy and pyright to validate code using the chardet library.
No, unless locked to character encoding detection library versions before 5.1.0. The description states the underlying library includes native type stubs since version 5.1.0 and recommends uninstalling this package if using that or a newer version. The package has not been updated since 2023-05-10.
Install
types-chardet on PyPI
pip
pip install types-chardetuv
uv add types-chardetpoetry
poetry add types-chardetInstalling types-chardet
Before you install
Low install friction with no runtime dependencies. However, the package has not been updated since 2023-05-10 and the description notes it is superseded by native type annotations available since version 5.1.0 of the underlying library.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in most projects without restriction.
Quickstart
pip install types-chardet
# Type checkers like mypy and pyright will now validate code
# that uses the character encoding detection library
Only useful with character encoding detection library versions before 5.1.0; the description notes that version 5.1.0 and later include native type annotations, making this package redundant.
Verify before relying
- Whether the type stubs remain accurate for library versions released after 2023-05-10.
- Compatibility with the latest versions of mypy, pyright, pytype, and PyCharm.
- Current maintenance status and whether updates are planned.
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,192 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,335,467/month — #4,035 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_chardet-5.0.4.6-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-emojiProvides type stubs for the emoji package,…
permissive · top 15,000 on PyPI
types-PillowProvides type stubs for Pillow, enabling static…
permissive · top 5,000 on PyPI
encutilsProvides encoding and character detection…
copyleft · top 5,000 on PyPI
types-SQLAlchemyProvides PEP 561 type stubs for SQLAlchemy,…
permissive · top 15,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
types-typed-astProvides type stubs for the typed-ast package,…
permissive · top 15,000 on PyPI
types-Flask-SQLAlchemyProvides type stubs for Flask-SQLAlchemy to…
permissive · top 15,000 on PyPI
types-enum34Provides type stubs for the enum34 package,…
permissive · top 15,000 on PyPI
types-babelProvides type stubs for the babel package,…
permissive · top 15,000 on PyPI
types-attrsProvides PEP 561 type stubs for the attrs…
permissive · top 15,000 on PyPI