Skip to main content

JSON Web Token implementation in Python

Project description

A Python implementation of RFC 7519. Original implementation was written by @progrium.


Install with pip:

$ pip install PyJWT


>>> import jwt
>>> encoded = jwt.encode({"some": "payload"}, "secret", algorithm="HS256")
>>> print(encoded)
>>> jwt.decode(encoded, "secret", algorithms=["HS256"])
{'some': 'payload'}


View the full docs online at


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.4.0.tar.gz (66.3 kB view hashes)

Uploaded source

Built Distribution

PyJWT-2.4.0-py3-none-any.whl (18.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page