Skip to main content

python-jose

A JOSE implementation in Python

Build Status Coverage Status Docs

Docs are available on ReadTheDocs.

The JavaScript Object Signing and Encryption (JOSE) technologies - JSON Web Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), and JSON Web Algorithms (JWA) - collectively can be used to encrypt and/or sign content using a variety of algorithms. While the full set of permutations is extremely large, and might be daunting to some, it is expected that most applications will only use a small set of algorithms to meet their needs.

Installation

$ pip install python-jose

Custom Backends

As of 2.0.0, python-jose uses pycryptodome by default for RSA signing and verification. If necessary, other RSA backends are supported. Both pycrpyto and crytography are options.

In order to use a custom backend, install python-jose with the appropriate extra.

$ pip install python-jose[pycrypto]
$ pip install python-jose[crytography]

Usage

>>> from jose import jwt
>>> token = jwt.encode({'key': 'value'}, 'secret', algorithm='HS256')
u'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ2YWx1ZSJ9.FG-8UppwHaFp1LgRYQQeS6EDQF7_6-bMFegNucHjmWg'

>>> jwt.decode(token, 'secret', algorithms=['HS256'])
{u'key': u'value'}

Thanks

This library was originally based heavily on the work of the folks over at PyJWT.

Metadata

Release files for python-jose 2.0.2

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

Source distribution (sdist)

Source distribution for python-jose 2.0.2
File Size Uploaded Provenance Actions
python-jose-2.0.2.tar.gz 17.0 kB Without provenance Details for python-jose-2.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 39.0 kB

Release files / python-jose-2.0.2.tar.gz

Download URL python-jose-2.0.2.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
391f860dbe274223d73dd87de25e4117bf09e8fe5f93a417663b1f2d7b591165
BLAKE2b-256 checksum
How to use checksums
16036aedc1d7675a070ab365028c2f5375e79ebf9d0b3d05769f390c2c0b895e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / python_jose-2.0.2-py2.py3-none-any.whl

Download URL python_jose-2.0.2-py2.py3-none-any.whl
Size 22.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
3b35cdb0e55a88581ff6d3f12de753aa459e940b50fe7ca5aa25149bc94cb37b
BLAKE2b-256 checksum
How to use checksums
bf5c5fa238c0c5b0656994b52721dd8b1d7bf52ebd8786518dde794f44de86b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for python-jose 2.0.2

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

2.0.2 This release

2 release files No provenance

0.1.0

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