pythonasyncioapiasyncfastapiframeworkjsonjson-schemaopenapiopenapi3pydanticpython-typespython3redocreststarletteswaggerswagger-uiuvicornweb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
351 B
21 lines
351 B
import logging
|
|
|
|
from app.db.init_db import init_db
|
|
from app.db.session import db_session
|
|
|
|
logging.basicConfig(level=logging.INFO)
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
def init():
|
|
init_db(db_session)
|
|
|
|
|
|
def main():
|
|
logger.info("Creating initial data")
|
|
init()
|
|
logger.info("Initial data created")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
|