yasuki_core.database.get_connection_string#

get_connection_string()[source]#

Get PostgreSQL connection string from environment or use default.

Checks YASUKI_DATABASE_URL first, then DATABASE_URL (used by Railway and other PaaS providers), then falls back to localhost. Public hosts get an sslmode appended (see apply_sslmode).

Returns:
dsnstr

PostgreSQL connection string