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 6.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mesh_client-6.0.1.tar.gz | 107.6 kB | Without provenance | Details for mesh_client-6.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mesh_client-6.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for mesh_client-6.0.1-py2.py3-none-any.whl |
Total release size: 138.5 kB
Release files / mesh_client-6.0.1.tar.gz
| Download URL | mesh_client-6.0.1.tar.gz |
|---|---|
| Size | 107.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f0a8bbffc21bace9b1c53284d81a523ad2e0b15753dfa071eda7deaf393abee
|
|
BLAKE2b-256 checksum How to use checksums |
e5132325aa2637fa09fc941bb6ac1effe1268b360d04ab870441a1e8eb681551
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / mesh_client-6.0.1-py2.py3-none-any.whl
| Download URL | mesh_client-6.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 31.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
fab58b70a1e816728bbef21c69888b9541a08461595c0650d5b509d97a3bfd38
|
|
BLAKE2b-256 checksum How to use checksums |
c02e053770e283f891466a71f5804eb49bf1337135a08c288185e2d5eaadd34e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for Mesh-Client 6.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.