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

Uploaded Source

Built Distribution

PyJWT-2.8.0-py3-none-any.whl (22.6 kB view hashes)

Uploaded Python 3

Supported by

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