How marat-kabirov/bita-technical-test works
BITA is a FastAPI index-constituents service. Clients upload CSVs, which are validated and appended with upload provenance; clients can soft-delete an ingested row or export the latest surviving version per business key over an effective-date range, optionally reconstructed as of a past time. JSON exports are returned as records and CSV exports are streamed. The README documents these capabilities; the graph reflects sampled runtime code and omits uncertain implementation details.
Main entry points: main.py FastAPI routes · ingest.py CSV validation · query.py Current-version query · models.py Persistence models
Components 9
HTTP API
- FastAPI routes
app/main.py - API schemas
app/schemas.py
CSV Ingestion
- CSV validation
app/services/ingest.py
Query and Persistence
- Current-version query
app/services/query.py - Session and engine
app/db.py - Persistence models
app/models.py
Other components
- API client
- CSV upload
- PostgreSQL
Connections 13
- API client → FastAPI routes: HTTP requests
- CSV upload → FastAPI routes: uploaded file
- FastAPI routes → CSV validation: ingests CSV
- CSV validation → PostgreSQL: inserts upload and rows
- FastAPI routes → PostgreSQL: soft-deletes record
- FastAPI routes → Current-version query: requests export rows
- Current-version query → PostgreSQL: queries versions
- FastAPI routes → API schemas: validates and shapes output
- Session and engine → PostgreSQL: connects
- FastAPI routes → Session and engine: creates tables and sessions
- CSV validation → Persistence models: uses upload models
- Current-version query → Persistence models: queries constituent model
- FastAPI routes → Persistence models: loads constituent record