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-0.4.3.tar.gz
(10.2 kB
view details)
Built Distribution
File details
Details for the file mirth-client-0.4.3.tar.gz
.
File metadata
- Download URL: mirth-client-0.4.3.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.4.0-1046-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98275c61d67169281e70774e1979f9cb90fb4739f6b8e79e0d6f6c5795d115e0 |
|
MD5 | cd7bb28b4a8bb38377a50ed6a3a4740b |
|
BLAKE2b-256 | be128fe99bea354b383c54f1744cc7808fcc82b88e77f323b923008b9d4cd793 |
File details
Details for the file mirth_client-0.4.3-py3-none-any.whl
.
File metadata
- Download URL: mirth_client-0.4.3-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.5 Linux/5.4.0-1046-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c3058472e09f71d8d60e8252fee54487fa81c57b210345703d23afdb78880ed |
|
MD5 | 31fcbb5ae0f1e47e650f6d615e53b175 |
|
BLAKE2b-256 | 951eab9d2d16ed7276f3ac681320bfc563d50564e16925eaed2295234ccb3ccd |