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

Uploaded Source

Built Distribution

mirth_client-3.0.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirth-client-3.0.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.10 Linux/5.11.0-1028-azure

File hashes

Hashes for mirth-client-3.0.0.tar.gz
Algorithm Hash digest
SHA256 31c8d1b7a789734b527f23b37cad2f5aa2aad8916b29cee25e31842522a7279b
MD5 263274bf03c82dd3a1c092bacafdc68b
BLAKE2b-256 0fb736517b9a2b9744844d6fd7d2ad589f681ad0942693cd04956fcd9e99cde0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mirth_client-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.10 Linux/5.11.0-1028-azure

File hashes

Hashes for mirth_client-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c386c0086410927161c2d919cf68f4c8659000aa1e304dfca569ea1e8ece042b
MD5 779c5b121ba9174ecdc50d47cd7d02ea
BLAKE2b-256 5b3dd0412edf3fecc3907de41e930ff27474074956457ed63de303a0fd7bb3c7

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