Python SDK
Python SDK offers a simple and convenient way of integrating a user's workflow scripts with Hydrosphere API.
You can learn more about it in its documentation here.

Installation

You can use pip to install hydrosdk
1
pip install hydrosdk=3.0.0
Copied!

Usage

You can access the locally deployed Hydrosphere platform from previous steps by running the following code:
1
from hydrosdk import Cluster, Application
2
import pandas as pd
3
​
4
cluster = Cluster("http://localhost", grpc_address="localhost:9090")
5
​
6
app = Application.find(cluster, "my-model")
7
predictor = app.predictor()
8
​
9
df = pd.read_csv("path/to/data.csv")
10
for row in df.itertuples(index=False):
11
predictor.predict(row)
Copied!
Last modified 5mo ago
Export as PDF
Copy link