--- id: httpx-auth version: "0.23.1" license: MIT License Copyright (c) 2024 Colin Bounouar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) license_treatment: permissive maintenance: aging --- # httpx-auth — Authentication for HTTPX License: permissive · Maintenance: aging · Downloads: 2.3M/mo ## 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 above — verify before relying. Provides authentication classes for httpx HTTP client requests, supporting OAuth2 flows, API keys, AWS signatures, and basic auth. 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 pip install httpx-auth uv add httpx-auth poetry add httpx-auth ## Installing httpx-auth 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. 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')) Requires Python 3.9 or later. OAuth2 flows that use browser-based authorization will open a local redirect server on port 5000 by default. 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: MIT License Copyright (c) 2024 Colin Bounouar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 2.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags oauth2 authentication httpx, http client authentication, api key authentication, oauth2 authorization code flow, aws signature v4, basic auth httpx, token management http, oauth2, http-client, authentication [View on SkillFed](https://skillfed.io/packages/httpx-auth) · [View on PyPI](https://pypi.org/project/httpx-auth/)