MESH Client
A Python client for NHS England's MESH API.
Release Notes
see CHANGE-LOG for news on major changes
Installation
pip install mesh-client
Example use
from mesh_client import MeshClient, INT_ENDPOINT
# or LIVE_ENDPOINT
with MeshClient(
INT_ENDPOINT,
'MYMAILBOX',
'Password',
cert=('/etc/certs/cert.pem', '/etc/certs/key.pem') # Mesh uses SSL, so you'll need some certs
) as client:
client.handshake() # It will work without this, but Spine will complain
message_ids = client.list_messages()
first_message = client.retrieve_message(message_ids[0])
print('Subject', first_message.subject)
print('Message', first_message.read())
first_message.acknowledge()
# Alternatively, iterate
for message in client.iterate_all_messages():
with message: # With block will handle acknowledgement
print('Message', message.read())
client.send_message('RECIPIENT_MAILBOX', b'Hello World!', subject='Important message')
Testing your application
We recommend using the mesh sandbox have a look at this docker-compose.yml for an example of how to run the sandbox
Guidance for contributors
see CONTRIBUTING
Metadata
Release files for Mesh-Client 5.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mesh_client-5.0.2.tar.gz | 111.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mesh_client-5.0.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 142.2 kB
Release files / mesh_client-5.0.2.tar.gz
| Download URL | mesh_client-5.0.2.tar.gz |
|---|---|
| Size | 111.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0ad1f2bc161ed3acfedfd7bc9b59de34d3cf3f688df8b7fd4eb0c4223bf917e
|
|
BLAKE2b-256 checksum How to use checksums |
8bd234289839e1a2d4788f15a6b14d0bfa45bf4fac338e15316a0a293bd7b0cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / mesh_client-5.0.2-py2.py3-none-any.whl
| Download URL | mesh_client-5.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 31.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d56757b2ed3f79f795aeec91085debbc657b2ad0daa99eb16384354990906624
|
|
BLAKE2b-256 checksum How to use checksums |
b8a692029e45d2e869f772701a0549ea8520d25f997a723df9b9d0b754665a34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|