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.1.0a0.tar.gz
(10.2 kB
view details)
Built Distribution
File details
Details for the file mirth-client-1.1.0a0.tar.gz
.
File metadata
- Download URL: mirth-client-1.1.0a0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.5 Linux/5.8.0-1033-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e209d3621fd603fdc1e1cd1356b9ee73eb72ef35f4a2e53d976097fee96e51a4 |
|
MD5 | d4330e6afb5852366124f55948bdb321 |
|
BLAKE2b-256 | c49e8cf948196ae71fa0fff038f547a37b15f4c31f41e7c2c761fe4feac8087e |
File details
Details for the file mirth_client-1.1.0a0-py3-none-any.whl
.
File metadata
- Download URL: mirth_client-1.1.0a0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.5 Linux/5.8.0-1033-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfb43c6c876fd3abbc5ca89ce977cafde156ffd4ff8f6b27d1b62e2a66684747 |
|
MD5 | b9550c9ad726ea55495f4ac655a6e612 |
|
BLAKE2b-256 | cdfff4c2c90d51bda88a844fddc2b11a6c592670e99c700d2853ef41aa15ba43 |