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.0.tar.gz
(8.1 kB
view details)
Built Distribution
File details
Details for the file mirth-client-0.2.0.tar.gz
.
File metadata
- Download URL: mirth-client-0.2.0.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-1040-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64bb93a61aa66b5892ae5f2acf8b310f9a3d2859cbeb8308daf91a244fbbb811 |
|
MD5 | b44c3db082bf576e20f72dd80272febc |
|
BLAKE2b-256 | 8670a532b6eadac3e0f657b9da9b244fdb418dd8a9fc33c4800da3dbf649287d |
File details
Details for the file mirth_client-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: mirth_client-0.2.0-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-1040-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67f130929c2c5e89ec53851ab7e125d8e7cca14e1adb37b06fbbfd73045bd677 |
|
MD5 | 9e1ececdd5edf098477a855d4d3c61f6 |
|
BLAKE2b-256 | 4ea5b8c7e23805934b241dd939b7de52d8bb746f9f5ddcf1edabd16a79d53ed2 |