Example #1
0
                   category_code="Electronics",
                   price="100 руб",
                   photo="-",
                   description="Описание товара")
    await add_item(id=3,
                   name="Apple",
                   category_name="🔌 Электроника",
                   category_code="Electronics",
                   price="100 руб",
                   photo="-",
                   description="Описание товара")
    await add_item(id=4,
                   name="Iphone",
                   category_name="🔌 Электроника",
                   category_code="Electronics",
                   price="100 руб",
                   photo="-",
                   description="Описание товара")
    await add_item(id=5,
                   name="Xiaomi",
                   category_name="🔌 Электроника",
                   category_code="Electronics",
                   price="100 руб",
                   photo="-",
                   description="Описание товара")


loop = asyncio.get_event_loop()
loop.run_until_complete(create_db())
#loop.run_until_complete(add_items())
Example #2
0
def create_structue_database():
    loop = asyncio.get_event_loop()
    loop.run_until_complete(create_db())
    loop.run_until_complete(add_items())