Skip to content

betting_combat.conf.settings

Typed settings from the environment, and the one multi-database client factory.

Environment variables are the only boundary (production: the location’s runtime secret, merged from Doppler global/prd then betting-combat; local: .env). Nothing here reads configuration tables — those are read live, inside steps, through betting_combat.store.configs.

Classes

PgTarget

One Postgres database to connect to — built only from Settings (the environment).

conninfo

conninfo() -> str

The libpq connection string (make_conninfo quotes and escapes every value).

with_database

with_database(database: str, **changes: object) -> PgTarget

Settings

Bases: BaseSettings

Root application settings — every field is read from the environment.

maintenance_target

maintenance_target(database: str = 'postgres') -> PgTarget

The server’s maintenance database (where CREATE DATABASE runs; bootstrap only).

Functions

make_check_client

make_check_client(config: Settings | None = None) -> CheckReader

The read-only client common-dagster’s generated table checks use (DGFlow.DB_FACTORY).

make_db_client

make_db_client(config: Settings | None = None) -> Databases

One client per database: data (default), configs and monitoring.

make_pg

make_pg(target: PgTarget, name: str) -> Pg

A client for one database (the bootstrap’s maintenance database).