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.4.0.tar.gz
(9.9 kB
view details)
Built Distribution
File details
Details for the file mirth-client-0.4.0.tar.gz
.
File metadata
- Download URL: mirth-client-0.4.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.4 Linux/5.4.0-1043-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94377f9135bc8b999c0a7aaa315e605cc506ef564c2ef4bd80846622ce44d5c1 |
|
MD5 | c6cc70e52fe151761e6f1a7346aea3cc |
|
BLAKE2b-256 | b1134c2a54a46df385de94beaa5ff0dc5af1cb8ac83426df1abc75d828301aea |
File details
Details for the file mirth_client-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: mirth_client-0.4.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.4 Linux/5.4.0-1043-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c57eb3a8b6e9b5ada5e3cb7d01f06af9d21ca27b4c5655ef88a9c0ca36e3e7fc |
|
MD5 | f2114da574adf80df5736a6a6828ce27 |
|
BLAKE2b-256 | 313561fe32137fd506e41a31d21b17442f8c7f25597f5cb24761eaaa2e68d013 |