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.1.tar.gz
(11.0 kB
view details)
Built Distribution
File details
Details for the file mirth-client-2.0.1.tar.gz
.
File metadata
- Download URL: mirth-client-2.0.1.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.6 Linux/5.8.0-1039-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42211fd958b13ebc31a8c49efb9999d657541d605f56d7ea77c6db4b9d110ac3 |
|
MD5 | f3bad73b06c87131a6c8f171d3a2e2d7 |
|
BLAKE2b-256 | 566979034fdfee19c9cfb05971700da3658222791c2637ae78ab0eb53ec69439 |
File details
Details for the file mirth_client-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: mirth_client-2.0.1-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.6 Linux/5.8.0-1039-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6f066d1b2c77ee26e2980b38d282058cf534bad03af073464343151d94a0020 |
|
MD5 | 00b65cc0d02125dcd9eba56805f60127 |
|
BLAKE2b-256 | e345a3732e84cc77b9537d04b884ca119fc9e870cf7b2af67bbe629ef975ab33 |