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.12.0.tar.gz (102.5 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.12.0-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyjwt-2.12.0.tar.gz
Algorithm Hash digest
SHA256 2f62390b667cd8257de560b850bb5a883102a388829274147f1d724453f8fb02
MD5 5dd1e287399ff64e714769666be92a90
BLAKE2b-256 a810e8192be5f38f3e8e7e046716de4cae33d56fd5ae08927a823bb916be36c1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pyjwt-2.12.0-py3-none-any.whl
  • Upload date:
  • Size: 29.7 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.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9bb459d1bdd0387967d287f5656bf7ec2b9a26645d1961628cda1764e087fd6e
MD5 96e3611c01927a9215b6df7aa9f731fb
BLAKE2b-256 157070f895f404d363d291dcf62c12c85fdd47619ad9674ac0f53364d035925a

See more details on using hashes here.

Provenance

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