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

services:

  mesh_sandbox:
    build: 
      context: https://github.com/NHSDigital/mesh-sandbox.git#refs/tags/v1.0.4
    ports:
      - "8700:443"
    deploy:
      restart_policy:
        condition: on-failure
        max_attempts: 3
    healthcheck:
      test: curl -ksf https://localhost/health || exit 1
      interval: 3s
      timeout: 10s
    environment:
      - SHARED_KEY=TestKey
      - SSL=yes
#      - STORE_MODE=file  # store mode file will persist data to disk
    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
      - ./src/mesh_sandbox/test_plugin:/app/mesh_sandbox/plugins:ro
      # you can mount a directory if you want access the stored messages
      #      - ./messages:/tmp/mesh_store
      # you can also mount different server cert and key if using ssl and you need a trusted certificate
#      - ./mycert.pem:/tmp/server-cert.pem:ro
#      - ./mycert.key:/tmp/server-cert.key:ro

Guidance for contributors

contributing

Project details


Release history Release notifications | RSS feed

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

If you're not sure about the file name format, learn more about wheel file names.

mesh_sandbox-1.0.68-py3-none-any.whl (82.0 kB view details)

Uploaded Python 3

File details

Details for the file mesh_sandbox-1.0.68-py3-none-any.whl.

File metadata

  • Download URL: mesh_sandbox-1.0.68-py3-none-any.whl
  • Upload date:
  • Size: 82.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.17.0-1018-azure

File hashes

Hashes for mesh_sandbox-1.0.68-py3-none-any.whl
Algorithm Hash digest
SHA256 21c62d99c57a81d7144348c57bdf88739333b400d4de321dcc977f65f6bfe417
MD5 8256d9ed19b25f9c150c44da8b76ef96
BLAKE2b-256 b89e31f7383222d22fa4b11790d1c8725a1e1e5fbc7447a75f1044e3f0aa98b1

See more details on using hashes here.

Supported by

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