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)
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzb21lIjoicGF5bG9hZCJ9.4twFt5NiznN84AWoo1d7KO1T_yoc0Z6XOpOVswacPZg
>>> 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.6.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.6.0.tar.gz | 73.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| PyJWT-2.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.3 kB
Release files / PyJWT-2.6.0.tar.gz
| Download URL | PyJWT-2.6.0.tar.gz |
|---|---|
| Size | 73.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69285c7e31fc44f68a1feb309e948e0df53259d579295e6cfe2b1792329f05fd
|
|
BLAKE2b-256 checksum How to use checksums |
7565db64904a7f23e12dbf0565b53de01db04d848a497c6c9b87e102f74c9304
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.0
|
Release files / PyJWT-2.6.0-py3-none-any.whl
| Download URL | PyJWT-2.6.0-py3-none-any.whl |
|---|---|
| Size | 20.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d83c3d892a77bbb74d3e1a2cfa90afaadb60945205d1095d9221f04466f64c14
|
|
BLAKE2b-256 checksum How to use checksums |
4046505f0dd53c14096f01922bf93a7abb4e40e29a06f858abbaa791e6954324
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.0
|