

def init_postgres(url):
    global DB
    db_name = url.path.strip('/')
    DB.initialize(PostgresqlDatabase(database=url, user=(url.user or ''), password=(url.password or ''), host=url.host, autocommit=bool(url.get('autocommit', True)), autorollback=bool(url.get('autorollback', True))))
    log.info("Database initialized as '%s'. Checking migrations...", db_name)
    return (DB, PostgresqlMigrator(DB))

dataset/ETHPy150Open mosquito/pypi-server/pypi_server/db/__init__.py init_postgres/VarMisuse@32/39 `db_name`->`url`