from typing import Mapping


def db_url(env: Mapping[str, str]) -> str:
    """Return a DB url for postgres."""
    return (
        'postgres://{DB_USER}:{DB_PASS}@{DB_HOST}:{DB_PORT}'
        '/{DB_NAME}'.format(**env)
    )