Skip to content

Instantly share code, notes, and snippets.

@codemation
Created November 15, 2021 08:54
Show Gist options
  • Save codemation/6e5e8d76ae24b7dde31c2afa2c41dab6 to your computer and use it in GitHub Desktop.
Save codemation/6e5e8d76ae24b7dde31c2afa2c41dab6 to your computer and use it in GitHub Desktop.
pydbantic_app_2-1.py
# 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