Runtime components
External dependencies
Python packages
| Package | Use | Reason |
|---|---|---|
| FastAPI | HTTP API | Defines routes, validation, and responses. |
| Uvicorn | ASGI server | Runs the FastAPI application. |
| SQLAlchemy | Database mapping | Maps Python models to SQLite rows. |
| aiosqlite | SQLite driver | Supports asynchronous database access. |
| pydantic-settings | Configuration | Reads environment variables safely. |
| python-multipart | File upload parsing | Reads browser multipart form data. |
| llama-cloud | Extraction client | Starts and reads LlamaCloud extraction jobs. |
External services
| Service | Required now | Use |
|---|---|---|
| SQLite | Yes | Stores local state in data/extractor.db. |
| LlamaCloud | Yes for live extraction | Extracts data from PDF files. |
| Redis | No | Use later only with a task queue or event stream. |
| PostgreSQL | No | Use later for multi-instance production work. |
| Celery | No | Use later for local, long-running task orchestration. |
Configuration
Set these values in .env.
DATABASE_URL=sqlite+aiosqlite:///./data/extractor.db
LLAMA_CLOUD_API_KEY=your-key
MAX_FILE_SIZE_MB=50
LLAMA_CLOUD_TIER=cost_effective