Skip to content

MLOps Python client

The MLOps Python client lets you use the MLOps API from your Python application. This guide describes how you can install the MLOps Python client, connect to MLOps and carry out tasks using the Python client. After successful installation, you can interact with the MLOps API via the MLOps gRPC Gateway. API specifications can be seen by accessing the MLOps gRPC Gateway URL via a browser.


If you are not sure how to access the MLOps gRPC Gateway, please contact your administrator.

API information

The MLOps Platform uses gRPC (Google Remote Procedure Call) as its internal communication framework. The platform's services are exposed using gRPC Gateway. The services are not accessible directly, but instead the platform follows the API Gateway pattern and uses a gateway service to contact individual services.

API gateway health check

The API gateway includes a health check endpoint that is accessible at /healthz. Navigate to <H2O_MLOps_GATEWAY>/healthz for the health check.

Installing the Python client


H2O MLOps version >= 0.40.0 is required in order to use the MLOps Python client.


All examples apart from can be run using Python 3.6 or later. The example requires Python 3.8.7 or later for the 3.8 branch and 3.9.1 or later for the 3.9 branch due to a combination of issues with Python's asyncio, aiohttp and OpenSSL modules. Other versions may work too, but they won't work reliably.

Downloading the Python client

To download the H2O MLOps Python client wheel, see the H2O MLOps downloads page.

Installing the Python client

The following steps describe how to install the H2O MLOps Python client.

  1. Navigate to the MLOps Python client wheel location and install using pip.


    This documentation uses pip for Python package installations. Alternatively, to install packages in Python3, use pip3.



    It is recommended that you create a Python virtual environment prior to installing the Python client and other dependencies.

    1. Navigate to the Python client wheel location.

    2. Create a Python virtual environment:


    3. Activate the created Python virtual environment:
      source <VIRTUAL-ENVIRONMENT-NAME>/bin/activate
    4. Install MLOps Python client using pip:
  2. Download the requirements.txt file that is compatible with your Python version in order to install the necessary dependencies:

    Python versions 3.6 - 3.9

    Python versions 3.7 - 3.10

  3. Install dependencies from the requirements.txt file:

    $ pip install -r requirements.txt