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

Uploaded Source

Built Distribution

mirth_client-1.0.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirth-client-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 c582ff95be3d464b1b0bd319a4fc7a2315b9a621ac80c2bf454612f156297109
MD5 6f4c534c0e3fa6d8506b848a3486e8d4
BLAKE2b-256 f4d39c2a756b4ab0cd9ae7b7caf26b1b03e3a38264472b173754e7528a6a78c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mirth_client-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b8b8e7bb718a238ab2fbf500e463942ba13776f134a459e03a0911b0c5df6b6f
MD5 c3dfd00e03194f45f3c60dc00cfaa638
BLAKE2b-256 984066017f5d97c82adc87d6326a6724c5b9ce810bc3e4e89306f846d7c1e1eb

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