Skip to main content

H2O Cloud Discovery Python CLient

Project description


licence pypi

H2O Cloud Discovery Client.


pip install h2o-cloud-discovery


Package provides two main functions. Synchronous and asynchronous h2o_discovery.discover_async(). Both functions return a discovery object that can be used to obtain the information the H2O Cloud environment, its services and clients.

When used within the H2O AI Cloud environment or locally with the H2O AI Cloud CLI configured, no further configuration is needed.

Both functions accept a environment argument that can be used to specify the H2O Cloud environment for which the discovery should be performed. Alternatively, the H2O_CLOUD_ENVIRONMENT environment variables can be used.

See API documentation for more details.

import h2o_discovery

discovery =

# Print the H2O Cloud environment that was discovered.

# Connect to the my service.
my_service_client = my_service.client(["my-service"].uri)


Example: Use within a notebook to connect to the H2O AI Drive

# Install required packages.

import sys
!{sys.executable} -m pip install h2o-cloud-discovery h2o-authn[discovery]
# Load discovery for the current environment.

import h2o_discovery
discovery =
# Create a token provider using the credentials loaded from the environment.

import h2o_authn.discovery
token_provider = h2o_authn.discovery.create_async(discovery)
# Install the H2O AI Drive client in the version specified by the available
# service.

import sys
!{sys.executable} -m pip install '{["drive"].python_client}'
# Connect to the H2O AI Drive and list home objects.

import h2o_drive
home = await h2o_drive.MyHome(
await home.list_objects()


Project is managed using Hatch.


For quick development tests use:

hatch run devtest:pytest

Full test matrix can be run using:

hatch env remove test && hatch run test:pytest


hatch run lint:check

Formating and imports can be fixed using:

hatch run lint:fix

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

h2o_cloud_discovery-2.0.0.tar.gz (16.3 kB view hashes)

Uploaded Source

Built Distribution

h2o_cloud_discovery-2.0.0-py3-none-any.whl (14.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page