__init__.py 879 Bytes
Newer Older
Weizhi Cui's avatar
Weizhi Cui committed
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
# @Version     : Python 3.11.4
# @Software    : Sublime Text 4
# @Author      : StudentCWZ
# @Email       : StudentCWZ@outlook.com
# @Date        : 2023/10/28 12:50
# @File        : __init__.py
# @Description :
"""


崔为之's avatar
崔为之 committed
14
from flask import Flask
崔为之's avatar
崔为之 committed
15 16 17

from .init_apispec import init_apispec
from .init_apscheduler import init_tasks
Weizhi Cui's avatar
Weizhi Cui committed
18
from .init_config import init_config
崔为之's avatar
崔为之 committed
19
from .init_consul import init_consul
崔为之's avatar
崔为之 committed
20
from .init_cors import init_cors
崔为之's avatar
崔为之 committed
21
from .init_dotenv import init_dotenv
崔为之's avatar
崔为之 committed
22
from .init_elasticsearch import init_elasticsearch
Weizhi Cui's avatar
Weizhi Cui committed
23 24 25 26 27
from .init_logger import init_logger
from .init_sqlalchemy import init_database


def init_plugs(app: Flask) -> None:
崔为之's avatar
崔为之 committed
28
    init_dotenv()
Weizhi Cui's avatar
Weizhi Cui committed
29 30 31 32
    init_config(app)
    init_logger(app)
    init_database(app)
    init_apispec(app)
崔为之's avatar
崔为之 committed
33
    init_elasticsearch(app)
崔为之's avatar
崔为之 committed
34
    init_cors(app)
崔为之's avatar
崔为之 committed
35
    init_consul(app)
崔为之's avatar
崔为之 committed
36
    init_tasks(app)