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

Uploaded Source

Built Distribution

mirth_client-1.2.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirth-client-1.2.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.5 Linux/5.8.0-1033-azure

File hashes

Hashes for mirth-client-1.2.0.tar.gz
Algorithm Hash digest
SHA256 689edc6ffe0d0c23702dd89834578266586bbf10131af27b5dcf6af9c5aaeb3f
MD5 b149b45abef80cb90cd4b962a1ad4207
BLAKE2b-256 8814e4706bbc2a9dfd2e3414c0f47adce8959b07f5d22f136264a15c37318712

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mirth_client-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fa0f1bec166b11d695e6b4acfd2f47ec6851ee06dc7b11d489ef506b18f3aba
MD5 380af32158e04e5c70c4d795dfe247e0
BLAKE2b-256 ce2f119d328e520d47b0ac157bb75d941c3512f46dec6f4af0262bc8c9785100

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