Skip to content

Database settings

DatabaseSettings

Database connection settings.

Note

You can pass here any extra option supported by SQLAlchemy Engine class, even if it is not mentioned in documentation.

Examples:

config.yml
database:
    url: postgresql+asyncpg://postgres:postgres@localhost:5432/syncmaster

    # custom option passed directly to SQLAlchemy Engine
    pool_pre_ping: True

Parameters:

  • url

    (PostgresDsn) –

    Database connection URL.

    Mandatory components:

    • host
    • username (urlencoded)
    • password (urlencoded)

    See SQLAlchemy documentation

    Warning

    Only async drivers are supported, e.g. asyncpg