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#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
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
Close
Hashes for mesh_sandbox-1.0.23-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cc6909df5c58bdaf30df3ce791c5ebebb19fe8a786617089dcba2c9a6c26213 |
|
MD5 | 72f25f68f67b1634248355adb3feb94c |
|
BLAKE2b-256 | 89f40832c6c14021a4fae2604d65f3c1014bb86de51018392fb8940b8791ff45 |