Client for NHS Digital 's MESH messaging system
Project description
MESH Client
A Python client for NHS Digital's MESH API.
Installation
pip install mesh_client
Example use
from mesh_client import MeshClient, NHS_DEP_ENDPOINT
client = MeshClient(
NHS_DEP_ENDPOINT,
'MYMAILBOX',
'Password123!',
cert=('/etc/certs/cert.pem', '/etc/certs/key.pem')) # Mesh uses SSL, so you'll need some certs
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')
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 Distribution
Mesh Client-0.10.1.tar.gz
(40.7 kB
view hashes)
Built Distribution
Close
Hashes for Mesh_Client-0.10.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 227b92a204b6b3400abc9f7b499bb2da6c5011d3023c3bcff121c031f26e2272 |
|
MD5 | c93308041da8f3fb470e7d0cfe07d6e0 |
|
BLAKE2b-256 | 460d7345f35052f0b0ac1fb6fb3327317e747c9ee9c4c6eef7583ee6164b5f1f |