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

Uploaded Source

Built Distribution

mirth_client-2.0.4-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirth-client-2.0.4.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.9 Linux/5.11.0-1021-azure

File hashes

Hashes for mirth-client-2.0.4.tar.gz
Algorithm Hash digest
SHA256 3d1e1cd1a93adc8ee9e66fb1b6ee1bcf1bba97ff88bb7dde2a86df49816abdef
MD5 423be3a0c536d749dfc3ee0baec5d41c
BLAKE2b-256 e98b53309db6b1ac432374abe81b18a091461cf6af43899fe9f4f2f5b4d514a2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mirth_client-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6c7ebb022f1ec4a07bd9aff46f5dc0eb267783cc295f05f02bcbc24dc918b831
MD5 6dd60cdc4922ad2274da69198e6c2cc6
BLAKE2b-256 3b0891019822494aad17b0fd31d9890664f7934e495efe6ffa23cad1eae5ef47

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