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.0.0.tar.gz
(10.1 kB
view details)
Built Distribution
File details
Details for the file mirth-client-1.0.0.tar.gz
.
File metadata
- Download URL: mirth-client-1.0.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.5 Linux/5.4.0-1047-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a5ca58d932fd530cb2916900e44d261ce4d918a5262aaa8471c795c04580b65 |
|
MD5 | 6e692707d7c422e58606ff9b5bf6e205 |
|
BLAKE2b-256 | 9174e11a559ba835f7bd76eca205a0f271b7a94de7919eba84071b223a0bc71d |
File details
Details for the file mirth_client-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: mirth_client-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.5 Linux/5.4.0-1047-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d501794e356f1acee2bdc98ed20cf85adf604b33cd18a7bca1394cbfbf7db524 |
|
MD5 | 1cc95c663ef36223ae66b7a7763681cb |
|
BLAKE2b-256 | 32bafcdd8d23331794ee8e1add1ce3951140f70734b07eae09267d373eaa554b |