Created
November 15, 2021 12:51
-
-
Save codemation/637e9dac06c29ad78ad0286bdf68598a to your computer and use it in GitHub Desktop.
pydbantic_db_8.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
from pydbantic import Database | |
from models import Employee | |
async def setup_database(): | |
await Database.create( | |
'sqlite:///company.db', | |
tables=[Employee], | |
cache_enabled=True, | |
redis_url='redis://localhost' | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment