skillfed

types-chardet

Typing stubs for chardet

types-chardet v5.0.4.6 1.3M downloads/30d#4,035 on PyPI5,108
Permissive license Apache-2.0 license Active released

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

uv

uv add types-chardet

poetry

poetry add types-chardet

Installing 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

License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Typing :: Stubs Only

Tags

type stubs for chardetchardet typing annotationsmypy chardet typesstatic type checking stubsPEP 561 type stubscharacter encoding type hints
type-stubsdeprecated

More Software Development packages