Spaces:
Running
Running
File size: 849 Bytes
0ebef7d | 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 | """Export Bank Statement — extractor service.
A thin, stateless FastAPI wrapper over the proven extraction engine:
PDF in -> reconciled statement data out. No storage, no auth (the web app's
API layer owns quota/auth/billing); this service only extracts.
"""
from __future__ import annotations
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.api.convert import router as convert_router
from app.core.config import ALLOWED_ORIGINS
app = FastAPI(title="Export Bank Statement — Extractor", version="0.1.0")
app.add_middleware(
CORSMiddleware,
allow_origins=ALLOWED_ORIGINS,
allow_methods=["GET", "POST", "OPTIONS"],
allow_headers=["*"],
)
app.include_router(convert_router)
@app.get("/health")
def health() -> dict:
return {"ok": True, "service": "extractor", "version": "0.1.0"}
|