我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用api.api()。
def configure_blueprints(app): from api import api from lib import errors app.register_blueprint(api) app.register_blueprint(errors)
def register_all_blueprints(): """ Regsiter all of my blueprints """ from api import api from frontend import frontend myBlueprints = [api, frontend] for blueprint in myBlueprints: app.register_blueprint(blueprint)