Skip to main content
Pooled clients + the generic client facade. Each client subclasses PooledClient (per-loop pooling, satisfies the contract BaseClient Protocol) and is reached by class through client_ctx. The driver each impl needs is declared by an extra (tai42-kit[curl] / [postgres]); import a driver submodule only when its driver is installed.

ClientDisconnectedError

tai42_contract.errors.ClientDisconnectedError
Raised when a client disconnects unexpectedly and is removed from the cache. This is not a permanent failure — retrying the operation will cause a fresh client to be created automatically.

ClientSettings

tai42_kit.clients.settings.ClientSettings
Attributes

Members

client_kwargs

tai42_kit.clients.settings.ClientSettings.client_kwargs
Connection kwargs passed to the client’s _create / current.

PooledClient

tai42_kit.clients.base.PooledClient

Members

current

tai42_kit.clients.base.PooledClient.current
Parameters

close

tai42_kit.clients.base.PooledClient.close
Parameters

PostgresConnectionSettings

tai42_kit.clients.settings.PostgresConnectionSettings
Attributes

Members

client_kwargs

tai42_kit.clients.settings.PostgresConnectionSettings.client_kwargs
Connection identity for the pooled client — JSON-serializable only. Pools are keyed by DSN + min/max size; callers that disagree on pool bounds get separate pools.

RedisConnectionSettings

tai42_kit.clients.settings.RedisConnectionSettings
Attributes

Members

client_kwargs

tai42_kit.clients.settings.RedisConnectionSettings.client_kwargs
Connection identity for the pooled client — JSON-serializable only. The facade keys its per-loop connection pool on these kwargs, so every value must be JSON-serializable. retry_attempts travels as an int; the redis client turns it into a Retry object at construction time — a Retry instance is not serializable and would break the pool key.

client_ctx

tai42_kit.clients.facade.client_ctx
Parameters

shutdown_all_clients

tai42_kit.clients.base.shutdown_all_clients
Close every live client pool for the running event loop. Sweeps the per-loop class-keyed cache and closes each pooled client. Closes are best-effort — failures are collected and raised together, never silently dropped.