ContreeConfig

class contree_sdk.config.ContreeConfig(base_url='CONTREE_BASE_URL', token='CONTREE_TOKEN', transport_timeout=10.0, file_upload_chunk_size=1048576, operation_import_timeout=None, operation_run_timeout=None, operation_timeout=600.0, operation_poll_secs_min=0.1, operation_poll_secs_max=10.0, operation_poll_secs_backoff_grow=1.75, images_list_batch_size=100)[source]

Configuration for the Contree SDK client.

Fields base_url and token support env var lookup: if the value matches an existing environment variable name, the value is loaded from it.

base_url: str = 'CONTREE_BASE_URL'

API server URL or env var name to load from.

token: str = 'CONTREE_TOKEN'

Auth token or env var name to load from.

transport_timeout: float = 10.0

HTTP timeout in seconds.

file_upload_chunk_size: int = 1048576

Chunk size in bytes for uploads.

operation_import_timeout: float | None = None

Import operation timeout, falls back to operation_timeout.

operation_run_timeout: float | None = None

Run operation timeout, falls back to operation_timeout.

operation_timeout: float = 600.0

Default timeout for operations.

operation_poll_secs_min: float = 0.1

Min polling interval for operation status checks.

operation_poll_secs_max: float = 10.0

Max polling interval for operation status checks.

operation_poll_secs_backoff_grow: float = 1.75

Backoff multiplier between polls. Higher values mean faster backoff growth; recommended range is 1 to 2.

images_list_batch_size: int = 100

Batch size for listing images.