init_marshmallow.py 549 Bytes
Newer Older
Weizhi Cui's avatar
Weizhi Cui committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#!/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 12:36
# @File        : init_marshmallow.py
# @Description :
"""

from flask import Flask

from flask_marshmallow import Marshmallow

ma = Marshmallow()


def init_marshmallow(app: Flask) -> None:
    """
    Initialize the database extension

    :param app: flask.Flask application instance
    :return: None
    """
崔为之's avatar
崔为之 committed
27
    ma.init_app(app)