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.0.0a2.tar.gz (41.4 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.0.0a2-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file PyJWT-2.0.0a2.tar.gz.

File metadata

  • Download URL: PyJWT-2.0.0a2.tar.gz
  • Upload date:
  • Size: 41.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.0

File hashes

Hashes for PyJWT-2.0.0a2.tar.gz
Algorithm Hash digest
SHA256 a4386eff1592a8cf2275acf8997fd2e1c20dcbfe20214f1d6928610dcb2fcf7b
MD5 ad882c3b2e305c4ae5f192580a2008cb
BLAKE2b-256 55065504daccf5c7f0bcbb1403f2539f453bb72b9180042362e8c11f6af72649

See more details on using hashes here.

File details

Details for the file PyJWT-2.0.0a2-py3-none-any.whl.

File metadata

  • Download URL: PyJWT-2.0.0a2-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.0

File hashes

Hashes for PyJWT-2.0.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 e47a729da8efc44022566915a0ad2f80320aa561ca5c233a1db6a82d84dafa6c
MD5 99b8776b03a1941eaf400a08a17846fe
BLAKE2b-256 430080d27d51c0d10a1630798716b7a7c6fcc21791f5b8f575b5bb8a1baed6bf

See more details on using hashes here.

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