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-1.2.2.tar.gz
(10.5 kB
view details)
Built Distribution
File details
Details for the file mirth-client-1.2.2.tar.gz
.
File metadata
- Download URL: mirth-client-1.2.2.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.5 Linux/5.8.0-1036-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10bb120eaac490d73d439a2bae3614bdc8fd886a078fdb385dab788f866f128e |
|
MD5 | dfe6fcfe9cda737f0e19a30c4bb0ce77 |
|
BLAKE2b-256 | 9cf5763a96d57e48293ccd12b2a544968dcf92288ba939e8c69eb834d2d0d153 |
File details
Details for the file mirth_client-1.2.2-py3-none-any.whl
.
File metadata
- Download URL: mirth_client-1.2.2-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.5 Linux/5.8.0-1036-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dbdc15e286a596f1062fd67c0d90f58641d8b57829cc66c55d5aadcb4986958 |
|
MD5 | f3959b899ff72c784ab281d632d34c4f |
|
BLAKE2b-256 | 93f6c53e7b2306fa75e9d90ebd9e1eae590382c35b0b6a2440b441e9753caffe |