22 lines
504 B
Python
22 lines
504 B
Python
"""
|
|
ScriptsManager Application Package
|
|
Flask web application for managing and executing Python scripts
|
|
"""
|
|
|
|
from flask import Flask
|
|
from app.config.config import config
|
|
from app.config.database import init_db
|
|
|
|
|
|
def create_app(config_name="default"):
|
|
"""Application factory pattern - creates and configures Flask app"""
|
|
app = Flask(__name__)
|
|
|
|
# Load configuration
|
|
app.config.from_object(config[config_name])
|
|
|
|
# Initialize database
|
|
init_db(app)
|
|
|
|
return app
|