Client library for interacting with MOTHR
Project description
mothrpy
Installation
pip install mothrpy
Usage
Basic example submitting a job request
from mothrpy import JobRequest
request = JobRequest(service='echo')
request.add_parameter(value='Hello MOTHR!')
result = request.run_job()
print(result)
Submitting a job request using MothrClient
. This allows you to reuse the
client connection when making multiple requests.
from mothrpy import JobRequest, MothrClient
client = MothrClient()
# Send one request
request = JobRequest(client=client, service='echo')
request.add_parameter(value='Hello MOTHR!')
result = request.run_job()
print(result)
# Reuse the client in another request
request = JobRequest(client=client, service='echo')
request.add_parameter(value='Hello again MOTHR!')
result = request.run_job()
print(result)
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
mothrpy-0.3.0.tar.gz
(8.5 kB
view hashes)