PyJWT
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/developers. |
||
Installing
Install with pip:
$ pip install PyJWT
Usage
>>> import jwt
>>> encoded = jwt.encode({"some": "payload"}, "secret", algorithm="HS256")
>>> print(encoded)
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzb21lIjoicGF5bG9hZCJ9.Joh1R2dYzkRvDkqv3sygm5YyK8Gi4ShZqbhK2gxcs2U
>>> jwt.decode(encoded, "secret", algorithms=["HS256"])
{'some': 'payload'}
Documentation
View the full docs online at https://pyjwt.readthedocs.io/en/stable/
Tests
You can run tests from the project root after cloning with:
$ tox
Metadata
Release files for PyJWT 2.2.0
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-2.2.0.tar.gz | 62.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| PyJWT-2.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 79.1 kB
Release files / PyJWT-2.2.0.tar.gz
| Download URL | PyJWT-2.2.0.tar.gz |
|---|---|
| Size | 62.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0b9a3b4e5ca5517cac9f1a6e9cd30bf1aa80be74fcdf4e28eded582ecfcfbae
|
|
BLAKE2b-256 checksum How to use checksums |
b96de5ac4eb80724cb4201de6dcbc1e8a9f5cb65a0424b30c4c69e49bc1363d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.0
|
Release files / PyJWT-2.2.0-py3-none-any.whl
| Download URL | PyJWT-2.2.0-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0ed5824c8ecc5362e540c65dc6247567db130c4226670bf7699aec92fb4dae1
|
|
BLAKE2b-256 checksum How to use checksums |
7d5a8ec21f8c4159708919b6cb5c203a1537349fd05265d2d88609493b462875
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.0
|