Skip to main content

PyJWT

https://github.com/jpadilla/pyjwt/workflows/CI/badge.svg https://img.shields.io/pypi/v/pyjwt.svg https://codecov.io/gh/jpadilla/pyjwt/branch/master/graph/badge.svg https://readthedocs.org/projects/pyjwt/badge/?version=stable

A Python implementation of RFC 7519. Original implementation was written by @progrium.

Sponsor

auth0-logo

If you want to quickly add secure token-based authentication to Python projects, feel free to check Auth0’s Python SDK and free plan at auth0.com/developers.

Installing

Install with pip:

$ pip install PyJWT

Usage

>>> import jwt
>>> encoded = jwt.encode({"some": "payload"}, "secret", algorithm="HS256")
>>> print(encoded)
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzb21lIjoicGF5bG9hZCJ9.Joh1R2dYzkRvDkqv3sygm5YyK8Gi4ShZqbhK2gxcs2U
>>> jwt.decode(encoded, "secret", algorithms=["HS256"])
{'some': 'payload'}

Documentation

View the full docs online at https://pyjwt.readthedocs.io/en/stable/

Tests

You can run tests from the project root after cloning with:

$ tox

Metadata

Release files for PyJWT 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyJWT 2.0.1
File Size Uploaded Provenance Actions
PyJWT-2.0.1.tar.gz 57.5 kB Without provenance Details for PyJWT-2.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PyJWT 2.0.1
File Interpreter ABI Platform Actions
PyJWT-2.0.1-py3-none-any.whl Python 3 none any Details for PyJWT-2.0.1-py3-none-any.whl

Total release size: 73.5 kB

Release files / PyJWT-2.0.1.tar.gz

Download URL PyJWT-2.0.1.tar.gz
Size 57.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a5c70a06e1f33d81ef25eecd50d50bd30e34de1ca8b2b9fa3fe0daaabcf69bf7
BLAKE2b-256 checksum
How to use checksums
ef68d610e2e10bc8336a033a6e0f0401341106ee9ed9cb0c1571b0d1a8eacf39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.0

Release files / PyJWT-2.0.1-py3-none-any.whl

Download URL PyJWT-2.0.1-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b70b15f89dc69b993d8a8d32c299032d5355c82f9b5b7e851d1a6d706dffe847
BLAKE2b-256 checksum
How to use checksums
b49b8850f99027ed029af6828199cc87179eaccbbf1f9e6e373e7f0177d32dad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.0

Security for PyJWT 2.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page