Spaces:
Sleeping
Sleeping
File size: 833 Bytes
ae3e2e2 |
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 |
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.api.endpoints import router as api_router
from app.core.config import settings
app = FastAPI(
title="Indian Financial Compliance API",
description="API for Indian financial compliance analysis and stock data",
version="1.0.0"
)
# Configure CORS
app.add_middleware(
CORSMiddleware,
allow_origins=["*"], # In production, replace with your Streamlit app URL
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
# Include API router
app.include_router(api_router, prefix="/api/v1")
@app.get("/")
async def root():
return {"message": "Indian Financial Compliance API"}
@app.get("/health")
async def health_check():
return {"status": "healthy", "api_key_configured": bool(settings.API_KEY)} |