h2o-authn
H2O Python Clients Authentication Helpers
What it is and what it does
h2o-authn wraps OAuth 2.0 token exchange for H2O.ai's Python ecosystem. It manages refresh tokens, handles access token expiration, and provides both synchronous and asynchronous token providers that can be passed directly to H2O client libraries. The package accepts either an issuer URL (for OIDC discovery) or a direct token endpoint URL, plus credentials and optional scope/expiry configuration. Tokens are exposed as callable objects that return fresh access strings, or as Token instances with additional attributes like expiration time and scope.
The package is designed as a thin authentication layer for H2O services—MLOps, Drive, Enterprise Steam—and optionally integrates with H2O Cloud Discovery for simplified configuration in cloud environments. It depends only on httpx for HTTP requests and supports current Python versions (3.9+).
Use it for:
- Authenticate to H2O MLOps Python Client by passing a TokenProvider instance as the token_provider argument
- Manage OAuth tokens in async H2O Wave applications using AsyncTokenProvider with environment-sourced credentials
- Exchange refresh tokens for access tokens in H2O Enterprise Steam login workflows
- Simplify multi-service authentication using H2O Cloud Discovery to auto-configure token providers
- Clone token providers with different scopes when accessing H2O services with varying permission requirements
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides OAuth 2.0 token management for H2O Python clients, handling refresh token exchange and access token lifecycle with both sync and async interfaces.
Yes. Low install friction, active maintenance, no known vulnerabilities, and permissive licensing make this a straightforward choice if you are using H2O Python clients. Install only if you need OAuth token management for H2O services; it is not a general-purpose OAuth library.
Install
h2o-authn on PyPI
pip
pip install h2o-authnuv
uv add h2o-authnpoetry
poetry add h2o-authnInstalling h2o-authn
Before you install
Low friction: pure Python wheel with a single runtime dependency (httpx). Active maintenance with recent release on 2025-04-28 and last commit 2026-08-11.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions.
Quickstart
pip install h2o-authn
import h2o_authn
provider = h2o_authn.TokenProvider(
refresh_token="your_refresh_token",
client_id="your_client_id",
issuer_url="https://your-issuer-url"
)
access_token = provider()
Requires Python 3.9 or later. Token endpoint URL or issuer URL must be provided; issuer URL requires network access for OIDC discovery.
Verify before relying
- Whether the package handles token refresh automatically or requires explicit calls
- Performance characteristics under high-frequency token requests
- Compatibility with H2O services outside the documented examples
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — httpx |
| Maintenance | actively maintained — 473 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 223,827/month — #9,240 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: h2o_authn-3.1.0-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
requests-oauth2clientAn OAuth 2.x client for Python that obtains,…
permissive · top 5,000 on PyPI
h2o-waveH2O Wave is a Python framework for building…
permissive · top 15,000 on PyPI
oauth2-clientHandles OAuth2 authentication flows…
unclear · top 15,000 on PyPI
requests-oauthlibAdds OAuth 1 and OAuth 2 authentication support…
permissive · top 1,000 on PyPI
pycognitoSimplifies AWS Cognito user authentication and…
permissive · top 5,000 on PyPI
auth0-api-pythonVerifies Auth0-issued access tokens and secures…
permissive · top 15,000 on PyPI
django-oauth-toolkitAdds OAuth2 authorization server capabilities…
permissive · top 5,000 on PyPI
requests-oauthAdds OAuth 1.0 authentication support to the…
permissive · top 5,000 on PyPI
Flask-OAuthlibFlask-OAuthlib adds OAuth 1.0a and OAuth 2.0…
permissive · top 15,000 on PyPI
google-oauthImplements Google OAuth2 authentication for…
permissive · top 15,000 on PyPI