Pre-release
This release is a pre-release and may not be stable for production use.
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'}
Command line
Usage:
pyjwt [options] INPUT
Decoding examples:
pyjwt --key=secret decode TOKEN pyjwt decode --no-verify TOKEN
See more options executing pyjwt --help.
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.0.0a1
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.0.0a1.tar.gz | 42.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| PyJWT-2.0.0a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.5 kB
Release files / PyJWT-2.0.0a1.tar.gz
| Download URL | PyJWT-2.0.0a1.tar.gz |
|---|---|
| Size | 42.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d0ca556ddccb911174502c9ee67b78839668408990483d4cbe9b1d0415d3b5c
|
|
BLAKE2b-256 checksum How to use checksums |
2109db4e34e3bd60f859c7dd228df10bfb375a9be437c0362f7c621ebd03902c
|
| 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.0.0a1-py3-none-any.whl
| Download URL | PyJWT-2.0.0a1-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d138fde3bf7faf3d44dfe880effe29358c23b5162790ab16703f0469ba17a2ab
|
|
BLAKE2b-256 checksum How to use checksums |
bf08982c35c71dcacbe00fb43715ffd27a795fcfa101d625d546d82d024cf0b6
|
| 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
|