python3-openid
OpenID support for modern servers and consumers.
What it is and what it does
python3-openid is a port of the Python OpenID library adapted for Python 3, providing both server and consumer implementations of the OpenID authentication protocol. It lets web applications authenticate users by delegating to external OpenID providers, or act as an OpenID provider themselves. The library wraps the core OpenID flows—discovery, authentication request, and verification—and includes optional storage backends for MySQL and PostgreSQL to persist authentication state.
The package depends only on defusedxml for secure XML parsing, keeping the core footprint small. It maintains API compatibility with the original python-openid library where possible, making it a drop-in replacement for Python 3 projects. The library includes logging hooks to surface recoverable errors and a working example server and consumer in its repository.
Use it for:
- Integrate OpenID login into a web application so users can authenticate with their existing OpenID accounts.
- Build an OpenID provider service that other applications can delegate authentication to.
- Migrate a Python 2 application using python-openid to Python 3 with minimal API changes.
- Store OpenID session state in MySQL or PostgreSQL for production deployments requiring persistent authentication records.
- Add federated identity support to a web service without implementing OAuth or SAML from scratch.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Implements OpenID authentication protocol support for Python 3 servers and clients, allowing applications to delegate user authentication to OpenID providers.
Yes, if you need OpenID support in Python 3 and can accept dormant maintenance. The library is production-stable, has no known vulnerabilities, and carries low install friction. However, be aware that active development stopped in 2020; if you require ongoing security patches or feature development, consider whether OpenID remains the right authentication choice for your use case, or evaluate actively maintained alternatives like OAuth 2.0 libraries.
Install
python3-openid on PyPI
pip
pip install python3-openiduv
uv add python3-openidpoetry
poetry add python3-openidInstalling python3-openid
Before you install
Low install friction with a single runtime dependency (defusedxml). Maintenance is dormant—the last release was 2020-06-29, over 2237 days ago, though the repository remains active with a recent commit on 2024-11-05. Production-stable but not actively developed.
License in practice
Licensed under Apache Software License (permissive), so you can use, modify, and distribute it freely in commercial and open-source projects without copyleft obligations.
Quickstart
pip install python3-openid
from openid.consumer.consumer import Consumer
from openid.store.memorystore import MemoryStore
store = MemoryStore()
consumer = Consumer({}, store)
Requires Python 3.5 or later; optional MySQL or PostgreSQL storage requires installing the relevant extra (e.g., pip install python3-openid[mysql]).
Verify before relying
- Whether PyPy3 compatibility issues mentioned in the description have been resolved since the last release.
- Current state of documentation generation and availability beyond Epydoc format.
- Whether the API remains fully compatible with the original python-openid library as intended.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — defusedxml |
| Maintenance | dormant — 2,237 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 8,320,129/month — #1,634 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python3_openid-3.2.0-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
python-openidImplements OpenID authentication for Python…
permissive · top 15,000 on PyPI
flask-oidcAdds OpenID Connect authentication support to…
permissive · top 5,000 on PyPI
django-oidc-providerProvides OpenID Connect and OAuth 2.0 server…
permissive · top 15,000 on PyPI
pyopImplements an OpenID Connect Provider (OP)…
permissive · top 15,000 on PyPI
Flask-OpenIDAdds OpenID authentication support to Flask web…
permissive · top 5,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
oicA complete Python implementation of OpenID…
permissive · top 15,000 on PyPI
python-keycloakProvides Python bindings to the Keycloak API,…
permissive · top 5,000 on PyPI
aioauthaioauth implements the OAuth 2.0 protocol for…
permissive · top 15,000 on PyPI
oidc-provider-mockA mock OpenID Connect provider server that runs…
permissive · top 15,000 on PyPI