compliance / app.py
lucifer7210's picture
Create app.py
ae3e2e2 verified
raw
history blame contribute delete
833 Bytes
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)}