skillfed

h2o-authn

H2O Python Clients Authentication Helpers

h2o-authn v3.1.0 223.8K downloads/30d#9,240 on PyPI5
Permissive license Apache-2.0 Active released

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-authn

uv

uv add h2o-authn

poetry

poetry add h2o-authn

Installing 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

Intended Audience :: DevelopersOperating System :: OS IndependentTopic :: InternetTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: SecurityTopic :: Utilities

Tags

oauth token providerh2o authenticationrefresh token exchangeaccess token managementasync token provideroauth 2.0 clienth2o cloud authentication
oauth-2.0h2o-ecosystemtoken-management

More Internet packages