File size: 1,069 Bytes
74632ff | 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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | """
ContextFlow Research - Flask Application Factory
"""
from flask import Flask
from flask_cors import CORS
def create_app():
"""Create and configure the Flask application."""
app = Flask(__name__)
CORS(app)
app.config['SECRET_KEY'] = 'contextflow-research-secret-2024'
app.config['JSON_SORT_KEYS'] = False
from app.api.main import api as api_blueprint
app.register_blueprint(api_blueprint, url_prefix='/api')
@app.route('/')
def index():
return {
'name': 'ContextFlow Research API',
'version': '1.0.0',
'status': 'running',
'endpoints': {
'health': '/api/health',
'session': '/api/session/*',
'predict': '/api/predict/*',
'behavior': '/api/behavior/*',
'graph': '/api/graph/*',
'review': '/api/review/*',
'peer': '/api/peer/*',
'gesture': '/api/gesture/*'
}
}
return app
__version__ = "1.0.0"
|