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.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirth-client-0.1.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.2 Linux/5.4.0-1040-azure

File hashes

Hashes for mirth-client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 942b0b0a3f1f8f7f42854596ea6ef94f980a1e6d9557cb023487a506ed13e56e
MD5 3a6e7e3759d73168536814a88c349fe2
BLAKE2b-256 6cad2b81a74adead178c6d06a769e7d20c9fc02245dd94b9315daf3e56d68923

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mirth_client-0.1.1-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 Linux/5.4.0-1040-azure

File hashes

Hashes for mirth_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e4d4ef6e024f781e5e0adef9cba2840229cce5689c1e424e805a1b085096b3b
MD5 1d145467807c27f2aa418593b6f691bf
BLAKE2b-256 b9bd24bf96d3aee55d38969482db0fa1fa228eb5b6bfbb37ef9dcd5e7b3f3563

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