Skip to main content

Basic Python interface for Mirth Connect

Project description

python-mirth-client

A basic async Python interface for Mirth Connect

Usage example

Assuming running within IPython or as part of an async application with an event-loop set up.

from mirth_client import MirthAPI
from pprint import pprint

async with MirthAPI("https://mirth.ukrdc.nhs.uk/api") as api:
    await api.login("****", "****")

    # Check out list of channels
    for channel in await api.get_channels():
        print(f"ID: {channel.id}")
        print(f"Name: {channel.name}")
        print("")

    # Get stats for a channel
    s = await channels["3cdefad2-bf10-49ee-81c9-8ac6fd2fed67"].get_statistics()
    pprint(s)

    # Check channel for failed messages
    e = await channels["3cdefad2-bf10-49ee-81c9-8ac6fd2fed67"].get_messages(status="error")
    pprint(e)

    # Get 10 most recent events
    e = await api.get_events(10)
    pprint(e)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mirth-client-0.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

mirth_client-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file mirth-client-0.1.0.tar.gz.

File metadata

  • Download URL: mirth-client-0.1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.2 Darwin/20.3.0

File hashes

Hashes for mirth-client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8efdd1d4a0b74d747ae3d59fb13c44902f9ec43af5e40a900764a3adfe240ed6
MD5 5ee4bba767d23ea30fa3e63a9cd2a699
BLAKE2b-256 6e09ed549cb220b6e8a2b8f0a9cf6dd2d6f41bc3e628a47d0b33b343a7c1d7ca

See more details on using hashes here.

File details

Details for the file mirth_client-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mirth_client-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.2 Darwin/20.3.0

File hashes

Hashes for mirth_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ced1d99fe4bb248314d5c4957dfebb3d381fd914733b860e8f91015dbc0417b
MD5 ef36a98e3c7fe353820f49de10c1c7aa
BLAKE2b-256 ccad88e74f4b50cad0754488d7f39762241b02b308b005e30a95ef40c59b4669

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page