Skip to main content

nsjwt

https://secure.travis-ci.org/cordalace/nsjwt.svg?branch=master

No Shit JWT implementation

Advantages:

  • Damn simple: only HMAC SHA-256 (“HS256”) algorithm implemented so no header parameter needed

  • Fast: uses ultrajson and pybase64

  • No Object-Oriented shit

Installation

pip install nsjwt

Usage

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

>>> nsjwt.encode(secret, payload)
b'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IlJvYmJpZSBCYXNobyIsImFkbWluIjp0cnVlfQ.MvN07jU4TCXH-lrYE2qsiY5cmxHO7ZCH8eLn6WpbWFM'

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

License

Apache 2.0 - See the LICENSE for more information.

Metadata

Release files for nsjwt 0.2.1

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

Source distribution (sdist)

Source distribution for nsjwt 0.2.1
File Size Uploaded Provenance Actions
nsjwt-0.2.1.tar.gz 3.4 kB Without provenance Details for nsjwt-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nsjwt 0.2.1
File Interpreter ABI Platform Actions
nsjwt-0.2.1-py3-none-any.whl Python 3 none any Details for nsjwt-0.2.1-py3-none-any.whl

Total release size: 6.9 kB

Release files / nsjwt-0.2.1.tar.gz

Download URL nsjwt-0.2.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cb118fd97f2b16f69a672f8bd007bf891e6f35961782cbe12ebbff70165019ad
BLAKE2b-256 checksum
How to use checksums
23d70c024300220c70ed4515a74ffe71b9502be3dcd9d470415b971aa74cdde9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / nsjwt-0.2.1-py3-none-any.whl

Download URL nsjwt-0.2.1-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0d64b5b7a10b3fe7a1474b549265fbe2192e369752112bdba4d6220d9e4080f
BLAKE2b-256 checksum
How to use checksums
b9feaaf4e200f6712226857927401a088f181e6889060eade839aba860170c6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for nsjwt 0.2.1

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.

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