Python SDK

Python SDK offers a simple and convenient way of integrating a user's workflow scripts with Hydrosphere API.

Source code: https://github.com/Hydrospheredata/hydro-serving-sdk PyPI: https://pypi.org/project/hydrosdk/

You can learn more about it in its documentation here.

Installation

You can use pip to install hydrosdk

pip install hydrosdk=3.0.0

Usage

You can access the locally deployed Hydrosphere platform from previous steps by running the following code:

from hydrosdk import Cluster, Application 
import pandas as pd

cluster = Cluster("http://localhost", grpc_address="localhost:9090")

app = Application.find(cluster, "my-model")
predictor = app.predictor()

df = pd.read_csv("path/to/data.csv")
for row in df.itertuples(index=False):
    predictor.predict(row)

Last updated