Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.1 KB

File metadata and controls

29 lines (18 loc) · 1.1 KB

Mint-v2 FastAPI Server

This directory contains the FastAPI backend for the Mint v2 - Malaria Intervention Tool. It provides APIs for planning and optimizing malaria interventions. The main purpose is to call the emulator model and serve the results to the SvelteKit client application.

Prerequisites

  • uv for managing virtual environments and dependencies
  • Redis server (for backend functionality)

Getting Started

Run FastAPI server in development mode (hot reloading):

uv run fastapi dev

Testing

To run the tests, use the following command:

uv run pytest

Emulator Wiring

The server calls run_scenarios in estimint, which derives the latent variables dn0 and eir from the input scenarios. These are passed to the neural network emulator in stateMINT, which takes the latent variables and covariates and returns predicted prevalence and cases. The server then formats those results and returns them to the client.