Last active
November 15, 2021 11:47
-
-
Save codemation/dadd072bc9585ca4e83068599ecbdd0e to your computer and use it in GitHub Desktop.
Revisions
-
codemation revised this gist
Nov 15, 2021 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # app.py import asyncio from db import setup_database from models import Employee, Positions, Department async def main(): @@ -13,5 +13,8 @@ async def main(): all_positions = await Positions.all() print(all_positions) all_departments = await Department.all() print(all_departments) asyncio.run(main()) -
codemation created this gist
Nov 15, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ # app.py import asyncio from db import setup_database from models import Employee, Positions async def main(): # setup db await setup_database() all_employees = await Employee.all() print(all_employees) all_positions = await Positions.all() print(all_positions) asyncio.run(main())