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.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.6.3.tar.gz | 41.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| PyJWT-1.6.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 61.2 kB
Release files / PyJWT-1.6.3.tar.gz
| Download URL | PyJWT-1.6.3.tar.gz |
|---|---|
| Size | 41.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c365c2c92063bdc609a9ef328958a910e249ffcad953895914b87e645412cf81
|
|
BLAKE2b-256 checksum How to use checksums |
3bfc2a479754113cee6824129f2f39dba555c939114ef5410bfa4cfdbbed6e8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / PyJWT-1.6.3-py2.py3-none-any.whl
| Download URL | PyJWT-1.6.3-py2.py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d527c3330d83d7278a0a8ef570b7c9c39fbf2c0c1edbe564a1a8a02d5352322b
|
|
BLAKE2b-256 checksum How to use checksums |
77114ccc1f4f8d812a6459e53f4f33107ae5d25babed9e6c1f0c6923b1fa8966
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |