from flask import Flask from flask_jwt_extended import JWTManager def create_app(): app = Flask(__name__) jwt = JWTManager(app) from app.api import bp, bp_errors, bp_product, bp_user app.register_blueprint(bp) app.register_blueprint(bp_errors) app.register_blueprint(bp_product) app.register_blueprint(bp_user) from app.config import FlaskTesting, FlaskProduction app.config.from_object(FlaskTesting) return app