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
client = MeshClient(
'https://msg.dep.spine2.ncrs.nhs.uk',
'MYMAILBOX',
'Password123!'
cert=('/etc/certs/cert.pem', '/etc/certs/key.pem'), # Mesh uses SSL, so you'll need some certs
verify='/etc/certs/mesh-ca-cert.pem')
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.9.4.tar.gz
(27.4 kB
view details)
Built Distribution
File details
Details for the file Mesh Client-0.9.4.tar.gz
.
File metadata
- Download URL: Mesh Client-0.9.4.tar.gz
- Upload date:
- Size: 27.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 985d91f8cb39dcd9d885a1673f1590f98250f3f9bdbabac3d5c8d6ac4cb104a4 |
|
MD5 | eccbce81008e298b080991f0af9a5795 |
|
BLAKE2b-256 | d4b467d70a77da4ad0666ab8a38e1c07ace20266d06b432c0e8b679914cecfb6 |
File details
Details for the file Mesh_Client-0.9.4-py2.py3-none-any.whl
.
File metadata
- Download URL: Mesh_Client-0.9.4-py2.py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2a69994d2095ea3db7a1629b9ae073108014630edabfbf08527da561e1717d6 |
|
MD5 | 5dd6e86f1484a3fec1c7931c84eb5eed |
|
BLAKE2b-256 | f45c2437f1b783b785c6f0a2aac31610deb594d270d25434f7541e264cc00248 |