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.channels():
        metadata = await channel.get_info()
        print(f"ID: {metadata.id}")
        print(f"Name: {metadata.name}")
        print("")

    # Get stats for a channel
    s = await api.channel("3cdefad2-bf10-49ee-81c9-8ac6fd2fed67").get_statistics()
    pprint(s)

    # Check channel for failed messages
    e = await api.channel("3cdefad2-bf10-49ee-81c9-8ac6fd2fed67").get_messages(status="error")
    pprint(e)

    # Get 10 most recent events
    e = await api.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-4.1.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file mirth_client-4.1.0.tar.gz.

File metadata

  • Download URL: mirth_client-4.1.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.9.23 Linux/6.11.0-1015-azure

File hashes

Hashes for mirth_client-4.1.0.tar.gz
Algorithm Hash digest
SHA256 2a1e74c8992d1e98362fdae14a90f6ddedb66a191a23cdea96c66f4f01f5eb8b
MD5 21186fbc6539a2b1691596a5abdbc7f5
BLAKE2b-256 b7044ace6fc1257085edbcf8501c7d0e0c6b588300b01a4feeb279cf10a3aa54

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mirth_client-4.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.9.23 Linux/6.11.0-1015-azure

File hashes

Hashes for mirth_client-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ecdf1c5fc8c5c35f50ffbc8d621ac07d73d6a741eb503c04ff692e2b9d2d98c6
MD5 9b0acaa50d667cc02b97adc8da63d883
BLAKE2b-256 6f059a30a52c3b41e59ba2e888d59f710bb0955e91b25902572549967b33842e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page