Created
November 15, 2021 08:54
-
-
Save codemation/6e5e8d76ae24b7dde31c2afa2c41dab6 to your computer and use it in GitHub Desktop.
pydbantic_app_2-1.py
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 characters
# app.py | |
import asyncio | |
from db import setup_database | |
from models import Employee | |
async def main(): | |
# setup db | |
await setup_database() | |
employee = await Employee.get(id='0877c661-0d53-4435-a800-425b64c08c43') | |
print(f"employee is {employee}") | |
asyncio.run(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment