def from_settings(settings):
    """Return a dict created from application settings.

    Args:
        settings (dict): An application's settings.

    Returns:
        dict: The database-specific settings, formatted to use with
            :func:`connection_url`.

    """
    return {
        k.replace('DATABASE_', '', 1).lower(): v
        for k, v in settings.items()
        if k.startswith('DATABASE_')}