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.0.tar.gz
(38.5 kB
view hashes)
Built Distribution
Close
Hashes for Mesh_Client-0.10.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 488ed51f0c69a64262bc7145f11102edb0750bb95c111c27be67f700faf2348e |
|
MD5 | 09f7e292c1a3986bf3cbdd488b75dcfe |
|
BLAKE2b-256 | 9e3c17d9bb2f061641bc2a23bd51bf2dec61228cd60080ff64b378a75de40cbd |