Skip to main content

JSON Web Token implementation in Python

Project description

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.

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

Project details


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.11.0.tar.gz (98.0 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.11.0-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyjwt-2.11.0.tar.gz
  • Upload date:
  • Size: 98.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyjwt-2.11.0.tar.gz
Algorithm Hash digest
SHA256 35f95c1f0fbe5d5ba6e43f00271c275f7a1a4db1dab27bf708073b75318ea623
MD5 00db5b7ec516b13e54e81433bb6eb58b
BLAKE2b-256 5c5ab46fa56bf322901eee5b0454a34343cdbdae202cd421775a8ee4e42fd519

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyjwt-2.11.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.11.0-py3-none-any.whl.

File metadata

  • Download URL: pyjwt-2.11.0-py3-none-any.whl
  • Upload date:
  • Size: 28.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyjwt-2.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94a6bde30eb5c8e04fee991062b534071fd1439ef58d2adc9ccb823e7bcd0469
MD5 c1ffbbdb1d2dc33488b02e9ee916f59e
BLAKE2b-256 6f01c26ce75ba460d5cd503da9e13b21a33804d38c2165dec7b716d06b13010c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyjwt-2.11.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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page