Basic Python interface for Mirth Connect
Project description
python-mirth-client
A basic async Python interface for Mirth Connect
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.ukrdc.nhs.uk/api") as api:
await api.login("****", "****")
# Check out list of channels
for channel in await api.get_channels():
print(f"ID: {channel.id}")
print(f"Name: {channel.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.1.0.tar.gz
(7.9 kB
view details)
Built Distribution
File details
Details for the file mirth-client-0.1.0.tar.gz
.
File metadata
- Download URL: mirth-client-0.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.2 Darwin/20.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8efdd1d4a0b74d747ae3d59fb13c44902f9ec43af5e40a900764a3adfe240ed6 |
|
MD5 | 5ee4bba767d23ea30fa3e63a9cd2a699 |
|
BLAKE2b-256 | 6e09ed549cb220b6e8a2b8f0a9cf6dd2d6f41bc3e628a47d0b33b343a7c1d7ca |
File details
Details for the file mirth_client-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: mirth_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.2 Darwin/20.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ced1d99fe4bb248314d5c4957dfebb3d381fd914733b860e8f91015dbc0417b |
|
MD5 | ef36a98e3c7fe353820f49de10c1c7aa |
|
BLAKE2b-256 | ccad88e74f4b50cad0754488d7f39762241b02b308b005e30a95ef40c59b4669 |