Metadata-Version: 2.1
Name: mesh-sandbox
Version: 0.1.3
Summary: NHSDigital mesh sandbox, a locally testable version of the MESH api
License: MIT
Author: spinecore
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: cryptography (>=38.0.3,<39.0.0)
Requires-Dist: fastapi (>=0.75.0,<0.76.0)
Requires-Dist: gunicorn (>=20.1.0,<21.0.0)
Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
Requires-Dist: types-python-dateutil (>=2.8.9,<3.0.0)
Requires-Dist: uvicorn (>=0.15.0,<0.16.0)
Description-Content-Type: text/markdown

MESH Sandbox
===========

MESH sandbox for local testing of [NHS Digital's MESH API](https://digital.nhs.uk/developer/api-catalogue/message-exchange-for-social-care-and-health-api).

Installation
------------


Example use
-----------

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

docker compose
--------------
```yaml
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

```

Guidance for contributors
-------------------------
this project uses
- python 3.9
- java coretto11
- poetry > 1.2

Setup
-----
using asdf
[install asdf](https://asdf-vm.com/guide/getting-started.html#_3-install-asdf)

get the required plugins
```bash
adsf plugin install python
adsf plugin install java
adsf plugin install poetry
```

install the tools
```bash
cd <project_dir>
asdf install
```

install the dependencies
```bash
make install
```
