Spaces:
Running
Running
Download app/main.py from optionalrudra/exportstatement: direct link, hf CLI and curl.
- Browser
- Download file 849 Bytes
-
https://huggingface.co/spaces/optionalrudra/exportstatement/resolve/main/app/main.py
- Command line
-
hf download hf://spaces/optionalrudra/exportstatement/app/main.py
-
curl -L -o main.py https://huggingface.co/spaces/optionalrudra/exportstatement/resolve/main/app/main.py
849 Bytes
| """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) | |
| def health() -> dict: | |
| return {"ok": True, "service": "extractor", "version": "0.1.0"} | |