Skip to main content

Basic Python interface for Mirth Connect

Project description

python-mirth-client

PyPI Release Documentation Status

A basic async Python interface for Mirth Connect

Installation

pip install mirth-client

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.domain.com/api") as api:
    await api.login("****", "****")

    # Check out list of channels
    for channel in await api.get_channels():
        metadata = await channel.get()
        print(f"ID: {metadata.id}")
        print(f"Name: {metadata.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.4.2.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

mirth_client-0.4.2-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirth-client-0.4.2.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.4 Linux/5.4.0-1046-azure

File hashes

Hashes for mirth-client-0.4.2.tar.gz
Algorithm Hash digest
SHA256 90e1af8c7cd11bc86ebdbc9c8a4894e483d84ca1044306facfa21f1837c70e7d
MD5 4cbc2a9aa4e0dee3e7ebe38533655223
BLAKE2b-256 69a35ad4d371239b0bf9bdd3ba7f7563f850ceff1f0c0e8417ef8203c132df91

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mirth_client-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.4 Linux/5.4.0-1046-azure

File hashes

Hashes for mirth_client-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a98ada2f6d4ba8cb420b33d8f7f783a82812dc6f8dd45433bf497c5fc756fb2f
MD5 17f34c1288571b0a14ffb530fe2c96a6
BLAKE2b-256 abb7902e51fae0381acd5d6ae39fff6891500c67468b8a8181a05ecdcd179939

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