Core Classes
Client
Main entry point for the Sinkove API.Properties
| Property | Type | Description |
|---|---|---|
id | uuid.UUID | Organization ID |
organization_name | str | Organization name |
datasets | DatasetClient | Dataset operations interface |
Dataset
Represents a dataset with metadata and operations.Properties
| Property | Type | Description |
|---|---|---|
id | uuid.UUID | Unique dataset identifier |
model_id | uuid.UUID | ID of the model used |
organization_id | uuid.UUID | Organization that owns this dataset |
num_samples | int | Number of samples to generate |
args | dict | Model-specific arguments |
created_at | str | ISO timestamp of creation |
state | str | Current processing state |
finished | bool | Whether processing is complete |
ready | bool | Whether dataset is ready for download |
metadata | Metadata | None | Dataset metadata (if available) |
Methods
download
output_file: Path where dataset will be savedstrategy: How to handle existing files ("fail","skip","replace")wait: Whether to wait for dataset to be readytimeout: Maximum seconds to wait
wait
DatasetClient
Manages dataset operations for an organization.Methods
create
list
get
Data Types
Metadata
Dataset States
| State | Description |
|---|---|
"PENDING" | Queued for processing |
"STARTED" | Currently generating |
"READY" | Successfully completed |
"FAILED" | Generation failed |
Advanced Classes
OrganizationClient
For managing multiple organizations.Environment Variables
| Variable | Description | Default |
|---|---|---|
SINKOVE_API_KEY | API key for authentication | Required |
SINKOVE_API_URL | (Optional) API endpoint URL | https://api.sinkove.com |
Exception Handling
| Exception | Cause |
|---|---|
ValueError | Missing required configuration |
TimeoutError | Operation timeout exceeded |
Exception | API errors, network issues, etc. |