Configuration#

class SDKConfiguration(api_key: str = <factory>, api_host: str = <factory>, api_scheme: str = <factory>, otlp_host: str = <factory>, otlp_scheme: str = <factory>, flight_host: str = <factory>, flight_port: int = <factory>, flight_scheme: str = <factory>, pyarrow_max_chunksize: int = <factory>, request_verify: bool = <factory>, stream_max_workers: int = <factory>, stream_max_queue_bound: int = <factory>, max_http_payload_size_mb: float = <factory>, arize_directory: str = <factory>, enable_caching: bool = <factory>, region: ~arize.regions.Region = <factory>, single_host: str = <factory>, single_port: int = <factory>, base_domain: str = <factory>, max_past_years: int = <factory>)[source]#

Bases: object

Configuration for the Arize SDK with endpoint and authentication settings.

This class holds pure configuration data and does not manage client lifecycle. Client creation and caching is handled by arize.ArizeClient.

This class is used internally by ArizeClient to manage SDK configuration. It is not recommended to use this class directly; users should interact with ArizeClient instead.

Each configuration parameter follows this resolution order:
  1. Explicit value passed to ArizeClient constructor (highest priority)

  2. Environment variable value

  3. Built-in default value (lowest priority)

Parameters:
  • api_key (str) – Arize API key for authentication. Required. Environment variable: ARIZE_API_KEY. Default: None (must be provided via argument or environment variable).

  • api_host (str) – API endpoint host. Environment variable: ARIZE_API_HOST. Default: “api.arize.com”.

  • api_scheme (str) – API endpoint scheme (http/https). Environment variable: ARIZE_API_SCHEME. Default: “https”.

  • otlp_host (str) – OTLP (OpenTelemetry Protocol) endpoint host. Environment variable: ARIZE_OTLP_HOST. Default: “otlp.arize.com”.

  • otlp_scheme (str) – OTLP endpoint scheme (http/https). Environment variable: ARIZE_OTLP_SCHEME. Default: “https”.

  • flight_host (str) – Apache Arrow Flight endpoint host. Environment variable: ARIZE_FLIGHT_HOST. Default: “flight.arize.com”.

  • flight_port (int) – Apache Arrow Flight endpoint port (1-65535). Environment variable: ARIZE_FLIGHT_PORT. Default: 443.

  • flight_scheme (str) – Apache Arrow Flight endpoint scheme. Environment variable: ARIZE_FLIGHT_SCHEME. Default: “grpc+tls”.

  • pyarrow_max_chunksize (int) – Maximum chunk size for PyArrow operations (1 to MAX_CHUNKSIZE). Environment variable: ARIZE_MAX_CHUNKSIZE. Default: 10_000.

  • request_verify (bool) – Whether to verify SSL certificates for HTTP requests. Environment variable: ARIZE_REQUEST_VERIFY. Default: True.

  • stream_max_workers (int) – Maximum number of worker threads for streaming operations (minimum: 1). Environment variable: ARIZE_STREAM_MAX_WORKERS. Default: 8.

  • stream_max_queue_bound (int) – Maximum queue size for streaming operations (minimum: 1). Environment variable: ARIZE_STREAM_MAX_QUEUE_BOUND. Default: 5000.

  • max_http_payload_size_mb (float) – Maximum HTTP payload size in megabytes (minimum: 1). Environment variable: ARIZE_MAX_HTTP_PAYLOAD_SIZE_MB. Default: 100.

  • arize_directory (str) – Directory for Arize SDK files (cache, logs, etc.). Environment variable: ARIZE_DIRECTORY. Default: “~/.arize”.

  • enable_caching (bool) – Whether to enable local caching. Environment variable: ARIZE_ENABLE_CACHING. Default: True.

  • region (Region) – Arize region (e.g., US_CENTRAL, EU_WEST). When specified, overrides individual host/port settings. Environment variable: ARIZE_REGION. Default: Region.UNSET.

  • single_host (str) – Single host to use for all endpoints. When specified, overrides individual host settings. Environment variable: ARIZE_SINGLE_HOST. Default: “” (not set).

  • single_port (int) – Single port to use for all endpoints. When specified, overrides individual port settings (0-65535). Environment variable: ARIZE_SINGLE_PORT. Default: 0 (not set).

  • base_domain (str) – Base domain for generating all endpoint hosts. Intended for Private Connect setups. When specified, generates hosts as api.<base_domain>, otlp.<base_domain>, flight.<base_domain>. When specified, overrides individual host settings. Environment variable: ARIZE_BASE_DOMAIN. Default: “” (not set).

  • max_past_years (int) – Maximum number of years in the past allowed for prediction timestamps. For on-prem deployments with custom retention policies, this can be increased. When set to a value other than the default, a warning will be issued advising to contact Arize support. Environment variable: ARIZE_MAX_PAST_YEARS. Default: 5.

Note

The endpoint override options (region, single_host/single_port, base_domain) are mutually exclusive. Specifying more than one will raise MultipleEndpointOverridesError.

Raises:
  • MissingAPIKeyError – If api_key is not provided via argument or environment variable.

  • MultipleEndpointOverridesError – If multiple endpoint override options are provided.

Parameters:
  • api_key (str)

  • api_host (str)

  • api_scheme (str)

  • otlp_host (str)

  • otlp_scheme (str)

  • flight_host (str)

  • flight_port (int)

  • flight_scheme (str)

  • pyarrow_max_chunksize (int)

  • request_verify (bool)

  • stream_max_workers (int)

  • stream_max_queue_bound (int)

  • max_http_payload_size_mb (float)

  • arize_directory (str)

  • enable_caching (bool)

  • region (Region)

  • single_host (str)

  • single_port (int)

  • base_domain (str)

  • max_past_years (int)

property api_url: str#

Return the base API URL.

base_domain: str#
property cache_dir: str#

Return the path to the cache directory.

property files_url: str#

Return the files upload endpoint URL.

property headers: dict[str, str]#

Return HTTP headers for API requests.

property headers_grpc: dict[str, str]#

Return headers for gRPC requests.

max_past_years: int#
property otlp_url: str#

Return the OTLP endpoint URL.

property records_url: str#

Return the records logging endpoint URL.

class Region(value, names=_not_given, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

Enum representing available Arize deployment regions.

classmethod list_regions(include_unset: bool = False) list[str][source]#

Return the list of available region values.

Parameters:

include_unset (bool) – Whether to include the UNSET region.

Returns:

A list of region strings.

Return type:

list[str]

CA_CENTRAL_1A = 'ca-central-1a'#
EU_WEST_1A = 'eu-west-1a'#
UNSET = ''#
US_CENTRAL_1A = 'us-central-1a'#
US_EAST_1B = 'us-east-1b'#