Skip to main content

No shit JWT implementation

Project description

No Shit JWT implementation


  • Damn simple: only HMAC SHA-256 (“HS256”) algorithm implemented so no header parameter needed
  • Fast: uses ultrajson and pybase64
  • No Object-Oriented shit


pip install nsjwt


>>> import nsjwt
>>> secret = 'secret'
>>> payload = {"sub": "1234567890", "name": "Robbie Basho", "admin": True}

>>> nsjwt.encode(secret, payload)

>>> nsjwt.decode(secret, b'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRmFoZXkiLCJhZG1pbiI6dHJ1ZX0.XDADzzjyGLeoLBl2BHJaytkLtGdhBb5KWsKOtZlVEo8')
{'admin': True, 'name': 'John Fahey', 'sub': '1234567890'}


Apache 2.0 - See the LICENSE for more information.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nsjwt, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size nsjwt-0.2.1-py3-none-any.whl (3.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size nsjwt-0.2.1.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page