Skip to main content

NHSDigital mesh sandbox, a locally testable version of the MESH api

Project description

MESH Sandbox

MESH sandbox for local testing of NHS Digital's MESH API.

Installation

Example use

pip

pip install mesh-sandbox
STORE_MODE=file MAILBOXES_DATA_DIR=/tmp/mesh uvicorn mesh_sandbox.api:app --reload --port 8700 --workers=1
curl http://localhost:8700/health

docker compose

version: '3.9'


services:

  mesh_sandbox:
    build: 
      context: https://github.com/NHSDigital/mesh-sandbox.git#develop
    ports:
      - "8700:80"
    deploy:
      restart_policy:
        condition: on-failure
        max_attempts: 3
    healthcheck:
      test: curl -sf http://localhost:80/health || exit 1
      interval: 3s
      timeout: 10s
    environment:
      - SHARED_KEY=TestKey
    volumes:
      # mount a different mailboxes.jsonl to pre created mailboxes
      - ./src/mesh_sandbox/store/data/mailboxes.jsonl:/app/mesh_sandbox/store/data/mailboxes.jsonl:ro
      # the mesh sandbox supports injecting a plugin to support test hooks 
      # - ./my_test_plugin.py:/app/mesh_sandbox/plugin/my_test_plygin.py:ro

Guidance for contributors

this project uses

  • python 3.9
  • java coretto11
  • poetry > 1.2

Setup

using asdf install asdf

get the required plugins

asdf plugin add python
asdf plugin add java
asdf plugin add poetry

install the tools

asdf install

install the dependencies

make install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

mesh_sandbox-1.0.4-py3-none-any.whl (78.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page