How pakvakunchik/api_downloader works
API Downloader exposes pages for starting downloads and viewing files, plus an endpoint for digit-frequency statistics. The main download flow fetches names from an external service, requests ZIP batches, stores their contents, and reports downloaded batches back. File listing and calculations query the same database. The graph reflects the shown router and utility calls; the README is empty, and no unsampled capabilities are assumed.
Main entry points: routers.py API routes · utils.py Download utilities · models.py File and progress models · database.py Database sessions
Components 13
API and pages
- FastAPI application
main.py - API routes
app/routers.py - Download page
templates/download.html - Files page
templates/files_page.html - API schemas
app/schemas.py
Download integration
- Download utilities
app/utils.py - File service
Persistence and domain
- Database sessions
app/database.py - File and progress models
app/models.py - Progress status
app/models_enum.py - File repository helper
app/repository.py - PostgreSQL database
Other components
- User
Connections 18
- User → FastAPI application: sends requests
- FastAPI application → API routes: registers routes
main.py - User → API routes: requests pages
- API routes → Download page: serves page
app/routers.py - API routes → Files page: serves page
app/routers.py - API routes → Download utilities: calls download
app/routers.py - Download utilities → File service: fetches names
app/utils.py - Download utilities → File service: requests ZIP batches
app/utils.py - Download utilities → File service: marks downloaded
app/utils.py - Download utilities → Database sessions: opens sessions
app/utils.py - Download utilities → File and progress models: inserts files
app/utils.py - API routes → Database sessions: depends on sessions
app/routers.py - API routes → File and progress models: queries files
app/routers.py - Database sessions → PostgreSQL database: connects
app/database.py - File and progress models → Database sessions: uses base
app/models.py - File and progress models → Progress status: uses status
app/models.py - File repository helper → File and progress models: queries and constructs
app/repository.py - API routes → API schemas: uses request and response models
app/routers.py