python-jose

A JOSE implementation in Python for JWS, JWE, JWK, and JWT signing/encryption

Library
PyPI
v3.5.0
1,758stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
51/100Fair
Development Activity12
Maintenance20
Community72
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
71/100Good
Architecture76
Code Quality74
Innovation62
Learning Curve72

python-jose is a Python implementation of the JavaScript Object Signing and Encryption (JOSE) family of standards — JSON Web Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), and JSON Web Algorithm (JWA) — including a high-level jwt module for encoding and decoding JSON Web Tokens. It supports three interchangeable cryptographic backends (pyca/cryptography, pycryptodome, and a pure-Python native backend), letting applications choose their dependency footprint while keeping the same public API.

Because JWT-based authentication is ubiquitous in modern APIs and single-sign-on flows, python-jose is a common building block for verifying and issuing tokens in Python web frameworks, OAuth2/OIDC clients, and API gateways that need to validate signed or encrypted tokens from identity providers like Auth0, Okta, or a custom OAuth2 server.

What You Get

  • A high-level jwt.encode() / jwt.decode() API supporting standard claims validation (expiry, audience, issuer) out of the box
  • Lower-level jws and jwe modules for direct JSON Web Signature and JSON Web Encryption operations when the high-level JWT API isn’t sufficient
  • jwk support for representing and loading RSA, EC, and symmetric keys, including JWK Set (JWKS) parsing for identity-provider public key rotation
  • Three swappable cryptographic backends — pyca/cryptography (recommended), pycryptodome, and a dependency-light pure-Python native backend — selected via install extras
  • Support for the full range of JOSE algorithms including RS256/384/512, ES256/384/512, HS256/384/512, and encryption algorithms for JWE

Common Use Cases

  • Verifying JWT access tokens issued by an OAuth2/OIDC identity provider (Auth0, Okta, AWS Cognito) in a Python API backend
  • Issuing signed JWTs for a custom authentication system, embedding claims like user ID, roles, and expiry
  • Decrypting JWE-encrypted tokens or payloads exchanged between services that require confidentiality, not just integrity
  • Validating and parsing JWKS (JSON Web Key Sets) to support key rotation for federated identity providers

Under The Hood

Architecture: The library is organized around the four JOSE primitives as top-level modules (jose/jws.py, jose/jwe.py, jose/jwk.py, jose/jwt.py), with jose/backends/ providing a strategy-pattern abstraction (base.py defines the interface; cryptography_backend.py, rsa_backend.py, ecdsa_backend.py, and native.py implement it) so the same signing/verification calls dispatch to whichever cryptographic library is installed, auto-detected at import time. jose/constants.py centralizes algorithm identifiers and jose/utils.py handles base64url encoding conventions used throughout JOSE. Tech Stack: Pure Python 3.9+, with ecdsa, rsa, and pyasn1 as always-installed native-backend dependencies, plus optional extras for cryptography or pycryptodome to swap in a faster/more standard backend; packaging uses setuptools with setup.cfg-driven metadata and a pyproject.toml build-backend declaration. Code Quality: The tests/ directory contains 21 test files covering each backend and JOSE primitive separately (e.g. backend-specific signature tests, cross-backend JWK conformance), with pytest-cov wired into CI (.codecov.yml) to track coverage; the multi-backend design forces test parity across three implementations, which is a meaningful correctness safeguard for a cryptography library. API Design: The jwt.encode()/jwt.decode() functions mirror the ergonomics of the popular PyJWT library closely, requiring only a payload dict, key, and algorithm string to get started, while the lower-level jws/jwe modules are available for applications needing direct control over JOSE primitives beyond the JWT convenience wrapper.

Used by 6 apps in this directory

Python
59%
Apache 2.0

argilla

AI Development · Data Engineering

5,081

Collaborate on high-quality AI training data with a self-hosted annotation platform built for LLMs, NLP, and multimodal models.

View details
65
Repo Health
81
Technical
63
Dependency
Built with
Python59%
Jupyter Notebook21%
Updated 2 days ago
Python
64%
MIT

Flowfile

Data Engineering

341

Visual ETL that compiles to Polars — build pipelines on a canvas, export as standalone Python, and run anywhere without platform lock-in.

View details
83
Repo Health
81
Technical
66
Dependency
Built with
Python64%
Vue19%
TypeScript16%
Updated today
TypeScript
53%
Apache 2.0

Flowsint

Automation · Developer Tools

7,669

A privacy-first, graph-based OSINT investigation platform with 30+ automated enrichers for mapping relationships between domains, IPs, people, and organizations.

View details
84
Repo Health
71
Technical
70
Dependency
Built with
TypeScript53%
Python45%
Updated 1 weeks ago
JavaScript
88%
GPL 3.0

Glass by Pickle

AI Assistants

7,577

A privacy-first desktop AI assistant that sees your screen, hears your meetings, and turns live context into structured summaries—without sending a single byte to the cloud.

View details
46
Repo Health
76
Technical
68
Dependency
Built with
JavaScript88%
TypeScript12%
Updated 9 months ago
TypeScript
51%
AGPL 3.0

Glean

Knowledge Management · Bookmarks Archiving

853

Self-hosted RSS reader and personal knowledge management tool with MCP server integration for AI assistant connectivity.

View details
78
Repo Health
75
Technical
69
Dependency
Built with
TypeScript51%
Python45%
Updated 2 days ago
Python
37%
Other

Open WebUI

AI Assistants · AI Agents

149,204

The extensible, privacy-first AI platform that runs Ollama, OpenAI, and any LLM backend behind a polished, feature-packed web interface.

View details
91
Repo Health
75
Technical
66
Dependency
Built with
Python37%
Svelte33%
JavaScript22%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search