def test_config(): conf = Config() conf.parse("settings/config.ini")
def dropdb(path): conf = Config() conf.parse(path) db = Database(conf.mysqldb) db.drop_table() click.echo('Dropped the database')
# Description: # ''' import time from fastapi import FastAPI, Request from pydantic import BaseModel from settings.config import Config from model.user import User from model.database import Database app = FastAPI() conf = Config() conf.parse("settings/config.ini") db = Database(conf.mysqldb) class ModelUser(BaseModel): name: str passwd: str email: str usertype: str organization: str @app.middleware("http") async def auth(request: Request, call_next): start_time = time.time() response = await call_next(request)
def initdb(path): conf = Config() conf.parse(path) db = Database(conf.mysqldb) db.create_table() click.echo('Initialized the database')