httpx-auth
Authentication for HTTPX
Decision gist · record as of 2026-08-14
Yes. The package is Production/Stable, has no known vulnerabilities, low install friction, and solves a common problem—integrating authentication with httpx—without requiring you to implement token management yourself. The aging maintenance status (last commit 2026-01-05) is not a blocker for stable use, but monitor the repository for updates if you depend on new OAuth2 flows or provider support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- OAuth2 flows that use browser-based authorization will open a local redirect server on port 5000 by default.
- Low install friction with a single runtime dependency (httpx).
License · maintenance · safety
permissive license (permissive) — MIT License permits free use, modification, and distribution with minimal restrictions. You may use this in proprietary projects without obligation to share your code.
last release 2025-01-07 (584 days) · last repo commit 2026-01-05 · 143 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,256,935 downloads/mo, #3,185 on PyPI
Alternatives
Verify before relying
pip install httpx-auth
import httpx
from httpx_auth import OAuth2AuthorizationCode
with httpx.Client() as client:
client.get('https://www.example.com', auth=OAuth2AuthorizationCode('https://www.authorization.url', 'https://www.token.url'))- Whether token cache persistence works with all OAuth2 flows or has specific limitations.
- Current stability relative to httpx 1.0.0 release—the package notes it will reach 1.0.0 once httpx stabilizes.
What it is and what it does
httpx-auth is an authentication layer for the httpx HTTP client library. It provides pre-built authentication classes that integrate directly with httpx's auth parameter, handling the complexity of token retrieval, refresh, and header formatting so you don't have to implement it yourself.
The package supports a wide range of authentication schemes: OAuth2 (Authorization Code, Authorization Code with PKCE, Resource Owner Password Credentials, Client Credentials, and Implicit flows), AWS Signature Version 4, API keys (in headers or query parameters), and basic authentication. It includes built-in support for specific providers like Okta, WakaTime, and Microsoft Entra. The single runtime dependency is httpx itself, and the package is typed for IDE support.
Use it for
- Authenticate requests to OAuth2-protected APIs (Okta, Microsoft Entra, WakaTime) using Authorization Code flow with automatic token refresh.
- Sign AWS API requests with Signature Version 4 without manually computing signatures.
- Add API key authentication to httpx requests, either as a header or query parameter.
- Implement OAuth2 Client Credentials flow for service-to-service authentication.
- Combine multiple authentication methods in a single request when an API requires both.
- Persist and reuse OAuth2 tokens across multiple requests to avoid repeated authorization steps.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is Production/Stable, has no known vulnerabilities, low install friction, and solves a common problem—integrating authentication with httpx—without requiring you to implement token management yourself. The aging maintenance status (last commit 2026-01-05) is not a blocker for stable use, but monitor the repository for updates if you depend on new OAuth2 flows or provider support.
Install
httpx-auth on PyPI
Before you install
Low install friction with a single runtime dependency (httpx). Maintenance status is aging—last commit was 2026-01-05 with 143 repository stars—but the package is marked Production/Stable and has been actively maintained since its first release in 2020-02-04.
Requires Python 3.9 or later. OAuth2 flows that use browser-based authorization will open a local redirect server on port 5000 by default.
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions. You may use this in proprietary projects without obligation to share your code.
Quickstart
pip install httpx-auth
import httpx
from httpx_auth import OAuth2AuthorizationCode
with httpx.Client() as client:
client.get('https://www.example.com', auth=OAuth2AuthorizationCode('https://www.authorization.url', 'https://www.token.url'))
Verify before relying
- Whether token cache persistence works with all OAuth2 flows or has specific limitations.
- Current stability relative to httpx 1.0.0 release—the package notes it will reach 1.0.0 once httpx stabilizes.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagehttpx |
| Maintenance | Aging 584 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,256,935 / month, #3,185 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/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Build ToolsTyping :: Typed |
Evidence: httpx_auth-0.23.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 › “oauth2 authentication httpx”
- httpx-authProvides authentication classes for httpx HTTP client requests,…
- AuthlibAuthlib provides a complete implementation of OAuth 1.0, OAuth 2.0,…
- fastapi-ssoFastAPI plugin that adds single sign-on (SSO) authentication to your…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also requests-auth · mohawk · httpx-oauth · oauth2-client · requests-oauthlib · httpx-ntlm · requests-oauth2client · google-auth-oauthlib · oauth2 · requests-oauth