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')
'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.5.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.5.1.tar.gz | 72.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| PyJWT-1.5.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 90.5 kB
Release files / PyJWT-1.5.1.tar.gz
| Download URL | PyJWT-1.5.1.tar.gz |
|---|---|
| Size | 72.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6b363d2015c33afd63dfd961d38ae40e97f7abd3db50c87ac626238bc1039a0
|
|
BLAKE2b-256 checksum How to use checksums |
b2b07fb49bcbc43f1ea70f1cb7c68e2d444295ec53dfd641f1d3600f44bbfc5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / PyJWT-1.5.1-py2.py3-none-any.whl
| Download URL | PyJWT-1.5.1-py2.py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
715813107a3e75c4479a32dfae4b3fbdb617e5037400e53a1c5a6bcb53c07795
|
|
BLAKE2b-256 checksum How to use checksums |
c5e70827289521d3725fcf3882df0fd499d23c02d1be0fed806d2a6f4585536f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |