Basic Python interface for Mirth Connect
Project description
python-mirth-client
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
Release history Release notifications | RSS feed
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.1.0.tar.gz
(10.9 kB
view details)
Built Distribution
File details
Details for the file mirth-client-3.1.0.tar.gz
.
File metadata
- Download URL: mirth-client-3.1.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.13 Linux/5.13.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c68eaa07cccd614d07ae1feed71e68135de317eec7d4777e7444d8efd331b65f |
|
MD5 | 7beca6d91ecdd1e610387dff6b822534 |
|
BLAKE2b-256 | 398d22573e2d0a8246aca453b17cb7b71c352392670472e01cb3dc084715d21f |
File details
Details for the file mirth_client-3.1.0-py3-none-any.whl
.
File metadata
- Download URL: mirth_client-3.1.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.13 Linux/5.13.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc3584e1122c7bd0c8039292ff8aff8d494ce0590a7782950fa54c5495b0d115 |
|
MD5 | 95844f11f0a7d4f5601af847fab10ce2 |
|
BLAKE2b-256 | c2b550dcc0dbab3e115b8bb0059006484a59860cefe5f503b02b03952327ede9 |