Skip to content
/ pyjwt Public
forked from jpadilla/pyjwt

JSON Web Token implementation in Python

License

Notifications You must be signed in to change notification settings

8451/pyjwt

This branch is 2 commits ahead of, 357 commits behind jpadilla/pyjwt:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Charles BazeleyCharles Bazeley
Charles Bazeley
and
Charles Bazeley
Jun 24, 2019
d3311d3 · Jun 24, 2019
May 19, 2018
Jun 12, 2019
Jun 24, 2019
May 5, 2019
May 19, 2017
May 19, 2018
May 5, 2019
Mar 15, 2018
Dec 6, 2018
Mar 3, 2018
Jan 18, 2015
Nov 12, 2016
Nov 2, 2018
May 6, 2016
Apr 17, 2017
Jun 24, 2019
May 5, 2019

Repository files navigation

PyJWT

https://travis-ci.com/jpadilla/pyjwt.svg?branch=master https://ci.appveyor.com/api/projects/status/h8nt70aqtwhht39t?svg=true 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 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/latest/

Tests

You can run tests from the project root after cloning with:

$ python setup.py test

About

JSON Web Token implementation in Python

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%