oauthlib
A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
Decision gist · record as of 2026-08-14
Yes. OAuthLib is a mature, actively maintained, zero-dependency library that is the de facto standard for OAuth protocol logic in Python. Install it if you need to add OAuth support to an HTTP library or framework, or if you're building an OAuth provider. Its permissive license and broad Python version support make it a safe, long-term choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- Low friction—pure Python wheel with no runtime dependencies.
- Actively maintained with recent commits and stable production status across Python 3.8–3.13 and PyPy.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause is permissive; you may use, modify, and distribute OAuthLib freely in commercial and private projects with minimal restrictions.
last release 2025-06-19 (421 days) · last repo commit 2026-07-14 · 2,976 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 332,548,810 downloads/mo, #126 on PyPI
Alternatives
Verify before relying
pip install oauthlib
from oauthlib.oauth2 import WebApplicationClient
client = WebApplicationClient('client_id')
uri, headers, body = client.prepare_request_uri('https://example.com/authorize')- Whether the library is suitable for OAuth provider-side implementations or primarily for client-side use.
- Performance characteristics when handling high-volume OAuth request signing.
- Current test coverage and what edge cases or spec compliance gaps remain.
What it is and what it does
OAuthLib is a pure-Python implementation of OAuth 1.0 (RFC 5849) and OAuth 2.0 (RFC 6749) request-signing logic. It is designed as a framework-agnostic library that handles the cryptographic and protocol details of OAuth without assuming any particular HTTP library or web framework. This means you can layer it on top of requests, urllib, or any other HTTP client, or embed it in Django, Flask, Pyramid, Bottle, or a custom framework.
The library is used either directly by developers building OAuth clients, or indirectly through higher-level packages like requests-oauthlib and framework-specific wrappers. It has been in active development since 2012, supports current Python versions (3.8–3.13), and carries no runtime dependencies, making it lightweight and easy to integrate into existing projects.
Use it for
- Add OAuth 2.0 client authentication to a requests-based HTTP client without using requests-oauthlib directly.
- Build a custom web framework's OAuth provider extension by implementing the protocol logic on top of OAuthLib.
- Implement OAuth 1.0 request signing for legacy APIs that still require it.
- Create a thin wrapper around OAuthLib for a specialized HTTP library or async framework.
- Validate and parse incoming OAuth requests in a custom authentication middleware.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
OAuthLib is a mature, actively maintained, zero-dependency library that is the de facto standard for OAuth protocol logic in Python. Install it if you need to add OAuth support to an HTTP library or framework, or if you're building an OAuth provider. Its permissive license and broad Python version support make it a safe, long-term choice.
Install
oauthlib on PyPI
Before you install
Low friction—pure Python wheel with no runtime dependencies. Actively maintained with recent commits and stable production status across Python 3.8–3.13 and PyPy.
Requires Python 3.8 or later.
License in practice
BSD-3-Clause is permissive; you may use, modify, and distribute OAuthLib freely in commercial and private projects with minimal restrictions.
Quickstart
pip install oauthlib
from oauthlib.oauth2 import WebApplicationClient
client = WebApplicationClient('client_id')
uri, headers, body = client.prepare_request_uri('https://example.com/authorize')
Verify before relying
- Whether the library is suitable for OAuth provider-side implementations or primarily for client-side use.
- Performance characteristics when handling high-volume OAuth request signing.
- Current test coverage and what edge cases or spec compliance gaps remain.
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 421 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 332,548,810 / month, #126 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersOperating System :: MacOSOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: ImplementationProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules |
Evidence: oauthlib-3.3.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “oauth client implementation”
- oauthlibOAuthLib implements OAuth 1.0 and OAuth 2.0 request-signing logic as…
- AuthlibAuthlib provides a complete implementation of OAuth 1.0, OAuth 2.0,…
- pkceGenerates PKCE (Proof Key for Code Exchange) code verifiers and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also aioauth · Flask-OAuthlib · oauth2 · requests-oauthlib · uplink · Authlib · oauth2client · google-auth-oauthlib · google-auth-oauthlib-stubs · django-oauth-toolkit