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-0.2.1.tar.gz
(8.1 kB
view details)
Built Distribution
File details
Details for the file mirth-client-0.2.1.tar.gz
.
File metadata
- Download URL: mirth-client-0.2.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.2 Linux/5.4.0-1041-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bfe3b9201c23c8b34f0866c4670a9bf3058dccda6f6506af0f156cf39971d68 |
|
MD5 | f0699c20a859611add029a495a42bdcb |
|
BLAKE2b-256 | a4642309a1a42ac91635dc8fcc88b05bfcc40e692ad52fcea37761e29bdbb225 |
File details
Details for the file mirth_client-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: mirth_client-0.2.1-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.2 Linux/5.4.0-1041-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e24f344af57616a4af35fcd44fdb5681a1076be85603688990e7e6a7fdadfcb9 |
|
MD5 | bdeda14f60648262540543283085f39c |
|
BLAKE2b-256 | 9414dc9e44b52607ea82705952ab9dbb7683a879e91a914f55387da39c2eb205 |