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/signup.

Installing

Install with pip:

$ pip install PyJWT

Usage

>>> import jwt
>>> encoded = jwt.encode({"some": "payload"}, "secret", algorithm="HS256")
>>> print(encoded)
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzb21lIjoicGF5bG9hZCJ9.4twFt5NiznN84AWoo1d7KO1T_yoc0Z6XOpOVswacPZg
>>> 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.14.0.tar.gz (113.2 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.14.0-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file pyjwt-2.14.0.tar.gz.

File metadata

  • Download URL: pyjwt-2.14.0.tar.gz
  • Upload date:
  • Size: 113.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyjwt-2.14.0.tar.gz
Algorithm Hash digest
SHA256 77283c83fb56ecf566a886c757a714bc83668e38156de2cce8263302f42e0b86
MD5 23f7e12f8bf2adb26944a36b41d93a9a
BLAKE2b-256 afc38a3b59c25070cc61dc517fbdfa5dc0904670c96f605cc69759dc09166b99

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyjwt-2.14.0.tar.gz:

Publisher: pypi-package.yml on jpadilla/pyjwt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyjwt-2.14.0-py3-none-any.whl.

File metadata

  • Download URL: pyjwt-2.14.0-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyjwt-2.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad0cef71c756a56e74863c2919cf0985f72decbcfcb550ee2f422e7c62b5eedc
MD5 5ea7f171a4a882301348e2d3a5a5801f
BLAKE2b-256 9c97672cb32ce0dfea44b740cb7b4f97038463b9cf7c0ead1aacf595572851d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyjwt-2.14.0-py3-none-any.whl:

Publisher: pypi-package.yml on jpadilla/pyjwt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.14.0 This release

2 files

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

2.4.0

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