Skip to content

The-Strategy-Unit/nhp-api-v2

Repository files navigation

NHP API v2

This project is an Azure Functions-based Python API for managing and running NHP model runs using Azure Container Instances.

It is a thin wrapper around the nhp-aci package.

Endpoints

  • POST /api/run_model — Start a new model run
  • GET /api/model_run_status/{id} — Get status for a specific model run
  • GET /api/list_current_model_runs — List all active model runs

Setup

  1. Install dependencies

Create a virtual environment and install requirements:

python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
  1. Local development

Configure environment variables by copying .env.sample to .env.

Use VS Code tasks to start the Azure Functions host:

func start

Or use the provided VS Code launch configuration to attach the debugger.

Deployment

Currently deploying via GitHub actions is disabled. Locally, run

func azure functionapp publish [FUNCTION_APP_NAME]

About

An API to run the New Hospital Programme (NHP) demand model using Azure Container Instances (ACI)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages