Created
November 15, 2021 08:40
-
-
Save codemation/93fb39291c9cc70f1680fc10cf759a37 to your computer and use it in GitHub Desktop.
pydbantic_db_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
# db.py | |
from pydbantic import Database | |
from models import Employee | |
async def setup_database(): | |
await Database.create( | |
'sqlite:///company.db', | |
tables=[Employee] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment