skillfed

types-PyJWT

Typing stubs for PyJWT

types-pyjwt v1.7.1 325.4K downloads/30d#7,586 on PyPI5,108
Permissive license Apache-2.0 license Active released

What it is and what it does

types-PyJWT is a PEP 561 type stub package that provides type hints for the PyJWT library. It allows static type checkers like mypy, PyCharm, and pytype to understand and validate code that uses PyJWT for JWT token handling. The stubs are auto-generated from the typeshed repository and enable developers to catch type-related errors at development time rather than runtime.

This package is primarily useful for projects still using PyJWT versions older than 2.0.0. Since PyJWT 2.0.0 and later versions include their own type annotations, installing this stub package alongside newer PyJWT versions is unnecessary and may cause conflicts. The package depends only on types-cryptography, which provides type hints for the underlying cryptography library.

Use it for:

  • Enable mypy or PyCharm type checking on legacy code using PyJWT versions before 2.0.0
  • Catch type errors during development in older PyJWT projects
  • Provide IDE autocomplete and type hints for PyJWT API calls in pre-2.0.0 codebases

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides type stubs for PyJWT to enable static type checking of JWT token handling code with tools like mypy and PyCharm.

No for most new projects — PyJWT 2.0.0+ includes its own type annotations. Yes-with-conditions if you maintain legacy code using PyJWT versions older than 2.0.0 and need type checking support. The package itself is stable and permissively licensed, but its lack of updates since June 2021 means coverage of newer PyJWT features is uncertain.

Install

types-pyjwt on PyPI

pip

pip install types-pyjwt

uv

uv add types-pyjwt

poetry

poetry add types-pyjwt

Installing types-PyJWT

Before you install

Low friction install as a wheel-only package. The project is actively maintained via typeshed, though this specific stub package has not been updated since June 2021 — check whether your PyJWT version is older than 2.0.0, since newer PyJWT includes its own type annotations.

License in practice

Apache-2.0 is permissive; you can use this package in commercial and proprietary code without restriction.

Quickstart

pip install types-PyJWT

Type checkers will then understand types-cryptography and PyJWT imports in your code.

Only useful if you are using PyJWT versions older than 2.0.0; PyJWT 2.0.0+ includes its own type annotations and this stub package should be uninstalled to avoid conflicts.

Verify before relying

  • Whether this stub package remains synchronized with current PyJWT releases and typeshed updates despite the 2021 release date
  • Compatibility with PyJWT versions released after 2021 and whether the stub definitions cover all current API surface
  • Whether installing alongside PyJWT 2.0.0+ causes actual conflicts or is merely redundant

Package facts

License Apache-2.0 license (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — types-cryptography
Maintenance actively maintained — 1,884 days since the last release
Last repo commit
First released
Downloads 325,444/month — #7,586 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: types_PyJWT-1.7.1-py2.py3-none-any.whl

License :: OSI Approved :: Apache Software LicenseTyping :: Typed

Tags

PyJWT type stubsJWT type checkingmypy PyJWT typesstatic type hints JWTPyJWT type annotationstype-checking JWT tokens
type-stubstypingjwt

More Software Development packages