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.0.tar.gz
(10.2 kB
view details)
Built Distribution
File details
Details for the file mirth-client-1.1.0.tar.gz
.
File metadata
- Download URL: mirth-client-1.1.0.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 | 72a33f4a79e21088339c33886908283f834a1e851cb1c6511772ea05704c58a2 |
|
MD5 | 5b895d5501af688d40c89558acd93171 |
|
BLAKE2b-256 | cf0f1d1d12d7cd189c964f211484be485e3da8d8a48de11d1f3f6534b3114bcc |
File details
Details for the file mirth_client-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: mirth_client-1.1.0-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 | 2abf7b67bd9150655ddc721b8a32dedd29f05e521ce286d50ab4d2a02cb3c69c |
|
MD5 | fdbad749b40c68b69e7135e8f955043b |
|
BLAKE2b-256 | cdafd461474e313fbb9c2d2ddf8c8a723457ee6c833e2de5caa448dd9fd5f7b4 |