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.3
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.3.tar.gz | 73.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| PyJWT-1.5.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 91.0 kB
Release files / PyJWT-1.5.3.tar.gz
| Download URL | PyJWT-1.5.3.tar.gz |
|---|---|
| Size | 73.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
500be75b17a63f70072416843dc80c8821109030be824f4d14758f114978bae7
|
|
BLAKE2b-256 checksum How to use checksums |
c92affd27735280696f6f244c8d1b4d2dd130511340475a29768ed317f9eaf0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / PyJWT-1.5.3-py2.py3-none-any.whl
| Download URL | PyJWT-1.5.3-py2.py3-none-any.whl |
|---|---|
| Size | 18.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a4e5f1441e3ca7b382fd0c0b416777ced1f97c64ef0c33bfa39daf38505cfd2f
|
|
BLAKE2b-256 checksum How to use checksums |
8aa64d931a2c77a224d27c78382f4ce8ec07542d4426ea2793bea77a689273c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |