A Python implementation of RFC 7519. Original implementation was written by @progrium.
Sponsor
If you want to quickly add secure token-based authentication to Python projects, feel free to check Auth0’s Python SDK and free plan at auth0.com/overview. |
||
Installing
Install with pip:
$ pip install PyJWT
Usage
>>> import jwt
>>> encoded = jwt.encode({'some': 'payload'}, 'secret', algorithm='HS256')
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzb21lIjoicGF5bG9hZCJ9.4twFt5NiznN84AWoo1d7KO1T_yoc0Z6XOpOVswacPZg'
>>> jwt.decode(encoded, 'secret', algorithms=['HS256'])
{'some': 'payload'}
Command line
Usage:
pyjwt [options] INPUT
Decoding examples:
pyjwt --key=secret TOKEN pyjwt --no-verify TOKEN
See more options executing pyjwt --help.
Documentation
View the full docs online at https://pyjwt.readthedocs.io/en/latest/
Tests
You can run tests from the project root after cloning with:
$ python setup.py test
Metadata
Release files for PyJWT 1.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| PyJWT-1.6.1.tar.gz | 40.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| PyJWT-1.6.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 59.2 kB
Release files / PyJWT-1.6.1.tar.gz
| Download URL | PyJWT-1.6.1.tar.gz |
|---|---|
| Size | 40.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dacba5786fe3bf1a0ae8673874e29f9ac497860955c501289c63b15d3daae63a
|
|
BLAKE2b-256 checksum How to use checksums |
eeaf7f500e3e587c927c88422099ce7ed9247f89f3217cabf00d3f48fe3ad5fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / PyJWT-1.6.1-py2.py3-none-any.whl
| Download URL | PyJWT-1.6.1-py2.py3-none-any.whl |
|---|---|
| Size | 18.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
bca523ef95586d3a8a5be2da766fe6f82754acba27689c984e28e77a12174593
|
|
BLAKE2b-256 checksum How to use checksums |
318f19c302aa9a391dd1fbd249362b749021b88d40fb59af0363939a2250afed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |