oauth2
library for OAuth version 1.9
What it is and what it does
oauth2 is a Python library that implements the OAuth 1.0 protocol (not OAuth 2.0) for authenticating requests to OAuth-protected APIs. It provides a thin wrapper around HTTP clients, automatically signing requests with consumer credentials and handling the OAuth signature generation. The library has no external runtime dependencies and is designed to work as a low-level building block for higher-level OAuth integrations.
The package was originally forked from earlier OAuth implementations and has been refined with 100% unit test coverage and a simplified API. It extends from httplib2 for HTTP transport and uses a Request class based on dict for flexibility. However, the package is dormant—its last release was in 2015 and it only declares support for Python 2.6, 2.7, 3.3, and 3.4, making it unsuitable for modern Python environments without verification of compatibility.
Use it for:
- Integrating with legacy OAuth 1.0 APIs that have not migrated to OAuth 2.0.
- Building a custom OAuth 1.0 client when higher-level libraries are not available or suitable.
- Maintaining existing applications that depend on oauth2 as a transitive dependency.
- Signing HTTP requests for services that require OAuth 1.0 authentication (e.g., Twitter API v1.1).
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Implements OAuth 1.0 authentication for Python applications, providing client-side request signing and HTTP integration for OAuth-protected APIs.
No, unless you are maintaining legacy code that already depends on this package. The library is dormant (last release 2015, last commit April 2024) and only declares support for Python 2.6–3.4. Modern Python applications should use oauth2-compatible alternatives or migrate to OAuth 2.0. If you must use OAuth 1.0, verify compatibility with your Python version first.
Install
oauth2 on PyPI
pip
pip install oauth2uv
uv add oauth2poetry
poetry add oauth2Installing oauth2
Before you install
Low install friction with no runtime dependencies. Maintenance is dormant—last release was in 2015 and the last commit in April 2024, though the repository remains active and the package is still widely depended upon downstream.
License in practice
MIT License (permissive) allows commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license text.
Quickstart
pip install oauth2
import oauth2 as oauth
client = oauth.Client(oauth.Consumer(key='consumer_key', secret='consumer_secret'))
resp, content = client.request('http://example.com/api', 'GET')
Package supports Python 2.6, 2.7, 3.3, and 3.4 only; compatibility with modern Python versions is not declared and likely absent.
Verify before relying
- Whether the package works reliably with Python versions beyond 3.4 despite no declared support.
- Current security posture relative to modern OAuth 1.0 best practices and known attack vectors.
- Whether downstream packages like Flask-Oauth have migrated away or continue active use.
Package facts
| License | MIT License (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 3,989 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 611,788/month — #5,760 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: oauth2-1.9.0.post1-py2.py3-none-any.whl
Keywords: oauth
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
Flask-OAuthlibFlask-OAuthlib adds OAuth 1.0a and OAuth 2.0…
permissive · top 15,000 on PyPI
oauthlibOAuthLib implements OAuth 1.0 and OAuth 2.0…
permissive · top 1,000 on PyPI
requests-oauthAdds OAuth 1.0 authentication support to the…
permissive · top 5,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
requests-oauthlibAdds OAuth 1 and OAuth 2 authentication support…
permissive · top 1,000 on PyPI
rauthRauth provides OAuth 1.0/a and OAuth 2.0…
permissive · top 5,000 on PyPI
oauth2-clientHandles OAuth2 authentication flows…
unclear · top 15,000 on PyPI
google-auth-oauthlibIntegrates oauthlib with google-auth to handle…
permissive · top 1,000 on PyPI
mohawkMohawk implements the Hawk HTTP authorization…
copyleft · top 5,000 on PyPI
python-upwork-oauth2Python bindings for the Upwork API using OAuth…
permissive · top 15,000 on PyPI