Skip to main content
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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyJWT-2.4.0.tar.gz (66.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PyJWT-2.4.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file PyJWT-2.4.0.tar.gz.

File metadata

  • Download URL: PyJWT-2.4.0.tar.gz
  • Upload date:
  • Size: 66.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for PyJWT-2.4.0.tar.gz
Algorithm Hash digest
SHA256 d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba
MD5 665f444d7805e36826bb09ce6434e73a
BLAKE2b-256 d86b6287745054dbcccf75903630346be77d4715c594402cec7c2518032416c2

See more details on using hashes here.

File details

Details for the file PyJWT-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: PyJWT-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for PyJWT-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf
MD5 79db059e7b5de6e878e1252c0489e96e
BLAKE2b-256 1cfbb82e9601b00d88cf8bbee1f39b855ae773f9d5bcbcedb3801b2f72460696

See more details on using hashes here.

Release history Release notifications | RSS feed

2.13.0

2 files

2.12.1

2 files

2.12.0

2 files

2.11.0

2 files

2.10.1

2 files

2.10.0

2 files

2.9.0

2 files

2.8.0

2 files

2.7.0

2 files

2.6.0

2 files

2.5.0

2 files

This release

2.4.0 This release

2 files

2.3.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

1.7.1

2 files

1.7.0

2 files

1.6.4

2 files

1.6.3

2 files

1.6.1

2 files

1.6.0

2 files

1.5.3

2 files

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.0

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.3

5 files

0.2.1

4 files

0.2.0

4 files

0.1.9

4 files

0.1.8

5 files

0.1.7

5 files

0.1.6

4 files

0.1.5

4 files

0.1.4

4 files

0.1.3

4 files

0.1.2

4 files

0.1.1

4 files

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