GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NHSDigital/mesh-client: A Python client library for NHS Digital MESH

BranchesTags
Open more actions menu

Latest commit

 

History

555 Commits
555 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
docker/squid
docker/squid
 
 
mesh_client
mesh_client
 
 
scripts
scripts
 
 
tests
tests
 
 
.gitallowed
.gitallowed
 
 
.gitdisallowed
.gitdisallowed
 
 
.gitignore
.gitignore
 
 
.tool-versions
.tool-versions
 
 
CHANGE-LOG.md
CHANGE-LOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
docker-compose.yml
docker-compose.yml
 
 
git-secrets
git-secrets
 
 
poetry.lock
poetry.lock
 
 
poetry.toml
poetry.toml
 
 
pyproject.toml
pyproject.toml
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 
sonar-project.properties
sonar-project.properties
 
 
tox.ini
tox.ini
 
 

Repository files navigation

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

About

A Python client library for NHS Digital MESH

Resources

Readme
MIT license

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

19 stars

Watchers

2 watching

Forks

11 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.