Skip to main content
Version: v3.0.0

Starting the client

To interact with the Feature Store, you need to authenticate first. The Python client exposes two entry points:

  • login() — the recommended way. It uses H2O AI Cloud discovery to locate the Feature Store services and to authenticate, based on your environment (a Notebook Engine, the H2O CLI configuration, a platform token, or a token provider you supply).
  • login_custom() — for advanced or off‑cloud deployments where you provide the service endpoints and OIDC parameters explicitly.

Both return a single FeatureStoreClient instance.

login (platform discovery)

login() discovers the Feature Store and authorization gateway endpoints through H2O AI Cloud discovery and authenticates you. The examples below cover the different ways to provide credentials.

From a Notebook Engine

If you are running the client from within a private Notebook Engine, your environment is already configured — no arguments are required.

import h2o_featurestore
client = h2o_featurestore.login()

Using the H2O CLI configuration

On your local machine, the recommended way is to download and configure the H2O CLI. Visit the CLI & API Access section of H2O AI Cloud to get started. Once configured, calling login() with no arguments picks up the CLI configuration automatically.

import h2o_featurestore
client = h2o_featurestore.login()

If your CLI configuration file lives in a non‑standard location, pass its path explicitly:

import h2o_featurestore
client = h2o_featurestore.login(config_path="/path/to/h2o-cli-config.toml")

Using a platform token

Log in to H2O AI Cloud and visit the CLI & API Access section to generate a platform token. Provide it together with your environment URL:

import h2o_featurestore
client = h2o_featurestore.login(
environment="https://cloud.h2o.ai",
platform_token="my-platform-token",
)

Using a token provider

If you already manage authentication yourself (for example, an application that refreshes tokens on your behalf), pass an h2o_authn.TokenProvider. Discovery is still used to locate the service endpoints, but the token provider supplies the access tokens.

import h2o_authn
import h2o_featurestore

token_provider = h2o_authn.TokenProvider(
issuer_url="https://auth.your-domain.com/auth/realms/your-realm",
refresh_token="my-secret-refresh-token",
client_id="oidc-app-client-id",
client_secret="oidc-app-secret",
)

client = h2o_featurestore.login(token_provider=token_provider)

login parameters

ParameterDescription
environmentH2O AI Cloud environment URL used for discovery. Defaults to the discovered/CLI‑configured environment.
token_providerAn h2o_authn.TokenProvider to authenticate with. When set, it takes precedence over platform_token.
platform_tokenPlatform token generated from the CLI & API Access page.
config_pathPath to the H2O CLI configuration file when it is not in the default location.
verify_sslWhether to verify SSL certificates. Defaults to True.
ssl_ca_certPath to a CA certificate bundle for verifying the server certificate.
storage_use_ca_certWhether to apply verify_ssl / ssl_ca_cert when connecting to the underlying object storage. Defaults to False.
note

The client configuration is stored by default in the user's home directory. You can change this location by setting the FEATURESTORE_USER_CONFIG environment variable to the desired location before starting the client.

login_custom (explicit OIDC)

Use login_custom() for advanced or off‑cloud deployments where discovery is not available and you supply the Feature Store endpoint, the authorization gateway endpoint, and the OIDC parameters explicitly.

import h2o_featurestore

client = h2o_featurestore.login_custom(
endpoint="https://featurestore.your-domain.com",
authz_endpoint="https://authz-gateway.your-domain.com",
refresh_token="my-secret-refresh-token",
issuer_url="https://auth.your-domain.com/auth/realms/your-realm",
client_id="oidc-app-client-id",
client_secret="oidc-app-secret",
)

login_custom parameters

ParameterDescription
endpointFeature Store service URL.
authz_endpointAuthorization gateway URL used for workspace and user operations.
refresh_tokenOIDC refresh token used to obtain access tokens.
issuer_urlOIDC issuer (identity provider) URL.
client_idOIDC client ID.
client_secretOIDC client secret. Optional for public clients.
verify_sslWhether to verify SSL certificates. Defaults to True.
ssl_ca_certPath to a CA certificate bundle for verifying the server certificate.
storage_use_ca_certWhether to apply verify_ssl / ssl_ca_cert when connecting to the underlying object storage. Defaults to False.

Using self‑signed certificates

Both login() and login_custom() accept SSL options. To trust a custom CA certificate:

import h2o_featurestore
client = h2o_featurestore.login(
config_path="/path/to/h2o-cli-config.toml",
verify_ssl=True,
ssl_ca_cert="certificate-path",
)

To disable certificate verification entirely (not recommended for production):

import h2o_featurestore
client = h2o_featurestore.login(verify_ssl=False)

Obtaining version

Call client.get_version() to fetch the versions. It returns a ComponentVersions object exposing the client_version and server_version properties (and helpers such as client_is_newer_than_server()).

versions = client.get_version()
print(versions.client_version)
print(versions.server_version)

FeatureStoreClient attributes

Both login() and login_custom() return a FeatureStoreClient instance. The table below lists its primary attributes:

AttributeTypeDescription
workspacesWorkspacesCreate, list, get, and manage workspaces. This is the primary entry point for all workspace and feature set operations. See Workspaces API.
jobsJobsList and get jobs across all accessible workspaces. See Jobs API.
usersUsersLook up users by email. Required before granting feature set permissions. See Permissions.
aclAclManage feature set permission requests and grants. See Permissions.
projectsProjectsAdmin-only migration tool. Retained from v2 to help administrators search legacy projects and migrate them to the workspace model. Not for general use — use workspaces instead. See Admin example.
job_concurrency_limitsJobConcurrencyLimitsAdmin-only. Set global and per-workspace job concurrency caps. See Admin example.
dashboardDashboardAccess Feature Store dashboard metrics. See Dashboard API.
classifiersClassifiersManage recommendation classifiers. Creating and updating classifiers requires admin access. See Recommendation API.
feature_set_reviewsClientReviewsList and manage feature set reviews across workspaces. See Feature Set Review API.

Feedback