Пример #1
0
def init_db(_):
    db_file = os.path.abspath(
        os.path.join(
            os.path.dirname(__file__),
            'db',
            'pypi.sqlite'
        ))
    DbSession.global_init(db_file)
def init_db(log: logbook.Logger):
    db_file = os.path.abspath(
        os.path.join(os.path.dirname(__file__), 'db', 'pypi.sqlite'))
    DbSession.global_init(db_file)

    log.notice('DB initialized.')
def init_db():
    top_folder = os.path.dirname(pypi.__file__)
    rel_file = os.path.join('db', 'pypi.sqlite')
    db_file = os.path.join(top_folder, rel_file)
    DbSession.global_init(db_file)