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-1.2.1.tar.gz
(10.5 kB
view details)
Built Distribution
File details
Details for the file mirth-client-1.2.1.tar.gz
.
File metadata
- Download URL: mirth-client-1.2.1.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.5 Linux/5.8.0-1033-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b6ac66567a5ce6be2225911edafcb8a31b8aa178e410ead7f98d42e406f87fd |
|
MD5 | e02e5c20fa5384ac62bde7348a82c64d |
|
BLAKE2b-256 | 03c72d202355ac63d2a23e2a1f4c7efc89b22becf5cc8f879024fd3ec0ef5ab4 |
File details
Details for the file mirth_client-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: mirth_client-1.2.1-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.5 Linux/5.8.0-1033-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19f7aa2f3a32857c551d1af75b5fd7e9f01a19e1df487c3a2d80e26161f7df81 |
|
MD5 | ea9f2e747e8ee4a68e87f28dc2430542 |
|
BLAKE2b-256 | 3c67b0a0693d9f32ed06845d3d54fa5f2adc4ab2d219fd306f22e31d7ff510d9 |