2024-01-08 00:38:17 +00:00
|
|
|
import aiosqlite
|
|
|
|
|
|
2024-01-13 01:54:04 +00:00
|
|
|
async def connect() -> aiosqlite.Connection:
|
|
|
|
|
return await aiosqlite.connect('your_database.db')
|
2024-01-08 00:38:17 +00:00
|
|
|
|
|
|
|
|
async def create():
|
2024-01-13 07:44:48 +00:00
|
|
|
import products.db as product_db
|
2024-01-08 00:38:17 +00:00
|
|
|
conn = await connect()
|
2024-01-13 01:54:04 +00:00
|
|
|
await product_db.create(conn)
|
2024-01-13 03:21:38 +00:00
|
|
|
|
2024-01-13 07:44:48 +00:00
|
|
|
import recipes.db as recipe_db
|
2024-01-13 03:21:38 +00:00
|
|
|
await recipe_db.create(conn)
|
|
|
|
|
|
2024-01-13 07:44:48 +00:00
|
|
|
import persons.db as person_db
|
2024-01-13 07:18:25 +00:00
|
|
|
await person_db.create(conn)
|
|
|
|
|
|
|
|
|
|
import meals.db as meals_db
|
|
|
|
|
await meals_db.create(conn)
|
|
|
|
|
|
2024-01-08 00:38:17 +00:00
|
|
|
await conn.commit()
|
|
|
|
|
await conn.close()
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
import asyncio
|
|
|
|
|
asyncio.run(create())
|