Python SDK

Getting up and running with the Superwise SDK

Superwise's SDK is a standard Python package that simplifies the integration with Superwise and streams data to the Superwise platform.


Python SDK Reference Guide

You can find more information about each function and method in our Python SDK reference guide.


Minimum Python version supported by the recent SDK is 3.7 and above


pip install -U superwise


Environment variables

There are 2 environment variables used to identify and authenticate your connection:


Read here more on how to generate them.

Package structure

Superwise object - create an instance of a Superwise object to interact with the Superwise APIs.

import os
from superwise import Superwise


sw = Superwise()


For on-prem users

initiate Superwise with an additional argument - superwise_host (the domain defined in the installation phase of Superwise, for example -

sw = Superwise(superwise_host=<your internal superwise host>)

All APIs will now be accessible under the sw instance. For example, all task APIs (create, get, etc.) can be found under the sw.task object.

Each object uses a Superwise model, which is an internal SDK representation of a given piece of data.

from superwise.models.model import Model

diamond_model = Model(
    name="Diamond Model",
    description="Regression model which predict the diamond price"

diamond_model = sw.model.create(diamond_model)
print(f"New task Created - {}")

Task has properties such as id, title, etc. You can use the get_properties() method to pull a list of all properties for a specific object.