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

Uploaded Source

Built Distribution

mirth_client-2.0.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirth-client-2.0.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.6 Linux/5.8.0-1039-azure

File hashes

Hashes for mirth-client-2.0.0.tar.gz
Algorithm Hash digest
SHA256 654d038414102e5ea672b895522491dacbce9a243975d037d714515e8629461a
MD5 ea60fc933b49212dbfa87bdea5ca97ec
BLAKE2b-256 6517e53ac9c832c497a4c2e5c312735ed01dac1918d059335eeeef9bb293c898

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mirth_client-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a324f4d84f16c85a41ceb852aed2e02b3e8ae4e322a9525916652bc7f39628d8
MD5 c48df783f37ead6ea53e6f1efb7e7fcf
BLAKE2b-256 7ba6b952f337ab41502350641196195cdc0d20e277209e461341346719e5aa91

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