Skip to main content

PyJWT

https://secure.travis-ci.org/jpadilla/pyjwt.svg?branch=master https://ci.appveyor.com/api/projects/status/h8nt70aqtwhht39t?svg=true https://img.shields.io/pypi/v/pyjwt.svg https://coveralls.io/repos/jpadilla/pyjwt/badge.svg?branch=master https://readthedocs.org/projects/pyjwt/badge/?version=latest

A Python implementation of RFC 7519. Original implementation was written by @progrium.

Sponsor

auth0-logo

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.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyJWT 1.6.4
File Size Uploaded Provenance Actions
PyJWT-1.6.4.tar.gz 41.7 kB Without provenance Details for PyJWT-1.6.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PyJWT 1.6.4
File Interpreter ABI Platform Actions
PyJWT-1.6.4-py2.py3-none-any.whl Python 3, Python 2 none any Details for PyJWT-1.6.4-py2.py3-none-any.whl

Total release size: 61.3 kB

Release files / PyJWT-1.6.4.tar.gz

Download URL PyJWT-1.6.4.tar.gz
Size 41.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4ee413b357d53fd3fb44704577afac88e72e878716116270d722723d65b42176
BLAKE2b-256 checksum
How to use checksums
005eb358c9bb24421e6155799d995b4aa3aa3307ffc7ecae4ad9d29fd7e07a73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / PyJWT-1.6.4-py2.py3-none-any.whl

Download URL PyJWT-1.6.4-py2.py3-none-any.whl
Size 19.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
30b1380ff43b55441283cc2b2676b755cca45693ae3097325dea01f3d110628c
BLAKE2b-256 checksum
How to use checksums
93d13378cc8184a6524dc92993090ee8b4c03847c567e298305d6cf86987e005
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for PyJWT 1.6.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.6.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page