totrader/totrader/factory.py

16 lines
378 B
Python

import quart.flask_patch
from quart import Quart
def create_app():
app = Quart(__name__)
app.config.from_envvar('FLASK_SECRETS', 'config.py')
@app.before_serving
async def startup():
from totrader.routes import meta
from totrader import filters
app.register_blueprint(meta.bp)
app.register_blueprint(filters.bp)
return app