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

Uploaded Source

Built Distribution

mirth_client-1.0.2-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirth-client-1.0.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.5 Linux/5.4.0-1047-azure

File hashes

Hashes for mirth-client-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7a6b0618317e758070bdec30ac55a79ed176ed77b6e1d62a806e3d35d92c0e13
MD5 5940715cf0ede08fb53d573440ac6d66
BLAKE2b-256 65514c2df6026e91d19be37caa60c6b6749af5deb3a6b4a8c43f7c60764e539c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mirth_client-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 82c1c7e6df4cda9a680362e968c444e833224ddad25407ea7d48943d93237d66
MD5 161c038909b322109c05aee6c6db0d7b
BLAKE2b-256 8110af6844059e5009258eb05b15f8a9bb1e7616490283eae1a0fa84e245ac19

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