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-2.0.3.tar.gz
(11.3 kB
view details)
Built Distribution
File details
Details for the file mirth-client-2.0.3.tar.gz
.
File metadata
- Download URL: mirth-client-2.0.3.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.7 Linux/5.8.0-1042-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c216d8b007e4244710370899ded7275a73c446dfd2fc181ff4bdd222b93190af |
|
MD5 | ec5ebd03e7de7f0373e27905ac8ce19e |
|
BLAKE2b-256 | 7458ce69925836bb6ecf33e229783725ef86b186ba2daf13ff45c52448e320be |
File details
Details for the file mirth_client-2.0.3-py3-none-any.whl
.
File metadata
- Download URL: mirth_client-2.0.3-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.7 Linux/5.8.0-1042-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e04e2fb46682dc3b782283eee0b0d17207d511ae9c1bb393c6fbadee4079575 |
|
MD5 | 05321bbc2bff46dfd974b459fd28169d |
|
BLAKE2b-256 | decb84d9ec2fce7952d6515bca4af14214737818fb632f59abe34e5aad37124b |