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.0

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.0
File Size Uploaded Provenance Actions
PyJWT-2.0.0.tar.gz 57.0 kB Without provenance Details for PyJWT-2.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 72.9 kB

Release files / PyJWT-2.0.0.tar.gz

Download URL PyJWT-2.0.0.tar.gz
Size 57.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7a2b271c6dac2fda9e0c33d176c4253faba2c6c6b3a99c7f28a32c3c97522779
BLAKE2b-256 checksum
How to use checksums
146d096dc269d105ba374d6bfd3ecb22b516795ca0572499820dadc8178d9ae1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.0

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

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

Security for PyJWT 2.0.0

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.0 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