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.channels():
        metadata = await channel.get_info()
        print(f"ID: {metadata.id}")
        print(f"Name: {metadata.name}")
        print("")

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

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

    # Get 10 most recent events
    e = await api.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-3.2.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

mirth_client-3.2.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirth-client-3.2.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.14 Linux/5.15.0-1020-azure

File hashes

Hashes for mirth-client-3.2.0.tar.gz
Algorithm Hash digest
SHA256 0f6a3e2400a9f855c7f0c6797c659416af2f1618499ea904c543a1f23dec82bc
MD5 021ab10b8e1e2ca74b942a65f7093835
BLAKE2b-256 708f0766891471989b84c6508074089fb5b8f80918091b5b366eb0b73c55c7df

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mirth_client-3.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.14 Linux/5.15.0-1020-azure

File hashes

Hashes for mirth_client-3.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ad6cbb96187ee0fbd3604c03515f3de0c69f623ff1507c461626f492932bccf
MD5 c89bc54e94b28f2f53923294792ad0b5
BLAKE2b-256 7ca8f66f84d534380d9b9e359f3e7c08af3c68db46e4fce0483cce9c7e6ac770

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