Client Options

tecton_client.client_options module

class tecton_client.client_options.TectonClientOptions(connect_timeout: timedelta = datetime.timedelta(seconds=2), read_timeout: timedelta = datetime.timedelta(seconds=2), keepalive_expiry: timedelta | None = datetime.timedelta(seconds=300), max_connections: int | None = 10)[source]

Bases: object

Class to represent the configurations for the underlying HTTP Client.

Examples

>>> options = TectonClientOptions(connect_timeout=timedelta(seconds=10),
...     keepalive_expiry=timedelta(seconds=600))
>>> tecton_client = TectonClient(url, api_key, client_options=options)
connect_timeout

(Optional) The maximum duration to wait until a socket connection to the requested host is established. Defaults to 2.0 seconds.

Type:

timedelta

read_timeout

(Optional) The maximum duration to wait for a chunk of data to be received (for example, a chunk of the response body). Defaults to 2.0 seconds.

Type:

timedelta

keepalive_expiry

(Optional) The time limit on idle keep-alive connections in seconds, with a default of 300 seconds (5 minutes). For no limits, this can be set to None.

Type:

Optional[timedelta]

max_connections

(Optional) The maximum number of allowable connections, with a default of 10. For no limits, this can be set to None.

Type:

Optional[int]

TectonClientOptions([connect_timeout, ...])

Class to represent the configurations for the underlying HTTP Client.