skillfed

oauth2

library for OAuth version 1.9

oauth2 v1.9.0.post1 611.8K downloads/30d#5,760 on PyPI3,009
Permissive license MIT License DORMANT released

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 oauth2

uv

uv add oauth2

poetry

poetry add oauth2

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: Implementation :: CPython

Tags

oauth 1.0 authenticationoauth request signingpython oauth libraryhttp oauth clientoauth 1.0a protocol
oauth-1.0legacydormant

More WWW/HTTP packages