rasenmaeher_api.db.config

Read database configuration from ENV or .env -file

Module Contents

Classes

DBConfig

DB config dataclass, functools etc used to avoid import-time side-effects

Attributes

LOGGER

config

LOGGER[source]
config[source]
class DBConfig[source]

DB config dataclass, functools etc used to avoid import-time side-effects

driver: str[source]
host: str | None[source]
port: int[source]
user: str | None[source]
password: starlette.datastructures.Secret[source]
database: str[source]
dsn: sqlalchemy.engine.url.URL | None[source]
pool_min_size: int[source]
pool_max_size: int[source]
echo: bool[source]
ssl: str[source]
use_connection_for_request: bool[source]
retry_limit: int[source]
retry_interval: int[source]
_singleton: ClassVar[DBConfig | None][source]
classmethod singleton(**kwargs)[source]

Get a singleton

Parameters:

kwargs (Any)

Return type:

DBConfig

__post_init__()[source]

Post init stuff

Return type:

None