""" FastAPI application for API Blackbox. """ from fastapi import FastAPI from fastapi.responses import JSONResponse from routers.procesador import router as procesador_router app = FastAPI( title="API Blackbox", description="Para correr cualquier API de forma agnóstica a sus inputs, outputs o especificación.", version="1.0.0", ) @app.get("/", tags=["blackbox"]) async def root(): """ Root endpoint. Returns: dict: Welcome message """ return { "message": "Welcome to API Blackbox", "docs": "/docs", "redoc": "/redoc" } @app.get("/health", tags=["blackbox"]) async def health_check(): """ Health check endpoint. Returns: dict: Status of the application """ return JSONResponse( status_code=200, content={ "status": "healthy", "message": "API is running" } ) app.include_router(procesador_router) if __name__ == "__main__": import uvicorn uvicorn.run(app, host="0.0.0.0", port=7860)