Skip to main content
The IYREE Python SDK provides a convenient interface to the IYREE platform, including data warehouse (StarRocks), Cube.js analytics, S3 object storage, and a key-value store.

Installation

To enable pandas integration (DataFrame support in DWH, Cube, and S3):
Requires Python 3.9 or later.

Initialization

There are two ways to use the SDK: module-level (global client) or explicit client instances.

Module-level

Call iyree.init() once, then access sub-clients directly on the iyree module.
Create an IyreeClient instance. Use it as a context manager to ensure resources are released.

Async client

For asyncio applications, use AsyncIyreeClient. All methods are await-able.

Configuration

str
required
API key for gateway authentication. Sent as the x-api-key header.
str
Gateway base URL (e.g. https://public-api.iyree.ru). Falls back to the IYREE_GATEWAY_HOST environment variable. If the value does not start with http:// or https://, https:// is prepended automatically.
float
default:"30.0"
Default HTTP request timeout in seconds.
float
default:"300.0"
Timeout for DWH Stream Load (insert) operations in seconds.
float
default:"120.0"
Maximum duration in seconds for Cube “Continue wait” polling.
int
default:"3"
Maximum retry attempts for retryable errors (timeouts, transport errors, HTTP 429/502/503/504).

Sub-clients

After initialization, access the four sub-clients as properties:

Error handling

All SDK exceptions inherit from IyreeError. Catch specific subclasses for fine-grained control.

Exception hierarchy

Each exception exposes .message, .status_code, and .response_body attributes.