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.13.0.tar.gz (107.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.13.0-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyjwt-2.13.0.tar.gz
Algorithm Hash digest
SHA256 41571c89ca91598c79e8ef18a2d07367d4810fbbd6f637794879baf1b7703423
MD5 3f263f71dd5f597119b1876dd7b444a9
BLAKE2b-256 3b8158d0ac84e1ef3a3843791d6954d94c0b33d526c75eeb1efbce9d0a4c4077

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for pyjwt-2.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66adcc2aff09b3f1bbd95fc1e1577df8ac8723c978552fd43304c8a290ac5728
MD5 c92c19fdacfbe513cb0b27f5bb8db617
BLAKE2b-256 a35eecf12fdb62546d64385c158514e9b2b671f7832108ef2ecd2020ce0af2d1

See more details on using hashes here.

Provenance

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