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.channels():
metadata = await channel.get_info()
print(f"ID: {metadata.id}")
print(f"Name: {metadata.name}")
print("")
# Get stats for a channel
s = await api.channel("3cdefad2-bf10-49ee-81c9-8ac6fd2fed67").get_statistics()
pprint(s)
# Check channel for failed messages
e = await api.channel("3cdefad2-bf10-49ee-81c9-8ac6fd2fed67").get_messages(status="error")
pprint(e)
# Get 10 most recent events
e = await api.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.2.0.tar.gz
(11.2 kB
view hashes)
Built Distribution
Close
Hashes for mirth_client-3.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ad6cbb96187ee0fbd3604c03515f3de0c69f623ff1507c461626f492932bccf |
|
MD5 | c89bc54e94b28f2f53923294792ad0b5 |
|
BLAKE2b-256 | 7ca8f66f84d534380d9b9e359f3e7c08af3c68db46e4fce0483cce9c7e6ac770 |