__init__.py 646 Bytes
Newer Older
Weizhi Cui's avatar
Weizhi Cui committed
1 2 3 4 5 6 7 8
#!/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/29 11:21
崔为之's avatar
崔为之 committed
9 10
# @File        : __init__.py
# @Description : Initializes the script for the Flask application.
Weizhi Cui's avatar
Weizhi Cui committed
11 12 13
"""


崔为之's avatar
崔为之 committed
14
# Import built-in modules
Weizhi Cui's avatar
Weizhi Cui committed
15 16
from flask import Flask

崔为之's avatar
崔为之 committed
17
# Import custom modules
Weizhi Cui's avatar
Weizhi Cui committed
18 19 20 21
from .cmdline import init


def init_script(app: Flask) -> None:
崔为之's avatar
崔为之 committed
22 23 24 25 26 27 28 29 30
    """
    Initialize the script for the Flask application.

    Args:
        app (Flask): A Flask application instance.

    Returns:
        None
    """
Weizhi Cui's avatar
Weizhi Cui committed
31
    app.cli.add_command(init)