Skip to content

SDK reference

UpriverClient

UpriverClient(*, host=UPRIVER_DEFAULT_HOST, token=None)

The entry point for using the upriver SDK. This class is used to initialize and manage the session with the Upriver API. This class contains the various endpoints that can be used to interact with the Upriver API.

Example:

from upriver.sdk import UpriverClient

with UpriverClient() as client:
    # Use the client to interact with the Upriver API
PARAMETER DESCRIPTION
host

The url of the Upriver API host.

TYPE: str DEFAULT: UPRIVER_DEFAULT_HOST

token

The token used for identification with the server. If not proivded, the token will be read from the environment variable UPRIVER_API_TOKEN.

TYPE: Optional[str] DEFAULT: None

Source code in upriver/sdk/client.py
26
27
28
29
30
31
32
33
34
35
def __init__(self, *, host: str = consts.UPRIVER_DEFAULT_HOST, token: Optional[str] = None):
    """
    :param host: The url of the Upriver API host.
    :param token: The token used for identification with the server.
    If not proivded, the token will be read from the environment variable UPRIVER_API_TOKEN.
    """
    self._session = Session(host=host, token=UpriverClient.__initialize_token(token))
    self._datasource_client = DatasourceClient(self._session)
    self._tag_client = TagClient(self._session)
    self._data_integration_client = DataIntegrationClient(self._session)

datasource_client property

datasource_client

The datasource API can be used to define and manage datasources in Upriver.

tag_client property

tag_client

The tag API can be used to define and manage tags in Upriver.

data_integration_client property

data_integration_client

The data integration API can be used to define and manage data integrations in Upriver.