# api/queue/__init__.py


import os

from flask import Flask
from flask_bootstrap import Bootstrap

# instantiate the extensions
bootstrap = Bootstrap()


def create_app(script_info=None):

    # instantiate the app
    app = Flask(
        __name__,
        template_folder="../client/templates",
        static_folder="../client/static",
    )

    # set config
    app_settings = os.getenv("APP_SETTINGS")
    app.config.from_object(app_settings)

    # set up extensions
    bootstrap.init_app(app)

    # register blueprints
    from api.queue.push.views import main_blueprint

    app.register_blueprint(main_blueprint)

    # shell context for flask cli
    app.shell_context_processor({"app": app})

    return app

[((10, 12, 10, 23), 'flask_bootstrap.Bootstrap', 'Bootstrap', ({}, {}), '()', False, 'from flask_bootstrap import Bootstrap\n'), ((16, 10, 20, 5), 'flask.Flask', 'Flask', (), '', False, 'from flask import Flask\n'), ((23, 19, 23, 44), 'os.getenv', 'os.getenv', ({(23, 29, 23, 43): '"""APP_SETTINGS"""'}, {}), "('APP_SETTINGS')", False, 'import os\n')]