generate_data.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:aiohttp_admin 作者: aio-libs 项目源码 文件源码
def init(loop):
    print("Generating Fake Data")
    pg = await init_postgres(conf['postgres'], loop)
    fake = Factory.create()
    fake.seed(1234)
    await preapre_tables(pg)

    quiestion_num = 1000
    choices_num = 5
    question_ids = await generate_questions(pg, quiestion_num, fake)
    await generate_choices(pg, choices_num, fake, question_ids)

    pg.close()
    await pg.wait_closed()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号