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

Uploaded Source

Built Distribution

mirth_client-0.3.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mirth-client-0.3.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.4 Linux/5.4.0-1043-azure

File hashes

Hashes for mirth-client-0.3.1.tar.gz
Algorithm Hash digest
SHA256 dcb104186830a01d3c0505e70a9c0b062a27790c3dadbb2f42db64ed8447807d
MD5 f2194a6068fbae391e7fc51baab79e08
BLAKE2b-256 06950a120156803372aa7278b57cbc2b58b75246a9158dc6586d39c96a042968

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mirth_client-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.4 Linux/5.4.0-1043-azure

File hashes

Hashes for mirth_client-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 208fa36dc86e6f213a2e6831a18fc7dba7464edbcdef10ba19005410d5c5db2a
MD5 9ec84f7c6e4aeb34d1e3e62db41b074e
BLAKE2b-256 49ca06b57fb11fbdee2a0282726ae339d128b961ecc4a1caf02fbeb2095632c2

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