A client's settings and its pool's limits.
min_connections/max_connections: the pool's size (0 to 10)idle_timeout: connections above the minimum close after this long unused (60 seconds)connection_ttl: replace a connection this long after it opened (each is used at least once, so 0 means never reuse)acquire_timeout: bound waiting for a connection, opening one included (unbounded)
Attributes#
| Attribute | Type | Description |
|---|---|---|
min_connections | int = 0 | |
max_connections | int = 10 | |
idle_timeout | DurationInput = '60 seconds' | |
connection_ttl | DurationInput | None = None | |
acquire_timeout | DurationInput | None = None |
Functions#
__init__#
__init__(*, url=None, host=None, port=None, path=None, ssl=None, database=None, username=None, password=None, connect_timeout=None, keep_alive=None, application_name=None, startup_parameters=dict[str, str](), startup_options=None, types=None, prepare=True, prepared_statement_cache_size=100, span_attributes=dict[str, object](), transform_result_names=None, transform_query_names=None, transform_json=True, on_acquire=None, min_connections=0, max_connections=10, idle_timeout='60 seconds', connection_ttl=None, acquire_timeout=None) -> None| Parameter | Type | Description |
|---|---|---|
url | Redacted[str] | None = None | |
host | str | None = None | |
port | int | None = None | |
path | str | None = None | |
ssl | bool | Mapping[str, str] | None = None | |
database | str | None = None | |
username | str | None = None | |
password | Password | None = None | |
connect_timeout | DurationInput | None = None | |
keep_alive | DurationInput | None = None | |
application_name | str | None = None | |
startup_parameters | Mapping[str, str] = dict[str, str]() | |
startup_options | str | None = None | |
types | AdaptersMap | None = None | |
prepare | bool = True | |
prepared_statement_cache_size | int = 100 | |
span_attributes | Mapping[str, object] = dict[str, object]() | |
transform_result_names | Callable[[str], str] | None = None | |
transform_query_names | Callable[[str], str] | None = None | |
transform_json | bool = True | |
on_acquire | Effect[None, Never, Any] | None = None | |
min_connections | int = 0 | |
max_connections | int = 10 | |
idle_timeout | DurationInput = '60 seconds' | |
connection_ttl | DurationInput | None = None | |
acquire_timeout | DurationInput | None = None |