Skip to main content

Client library for interacting with MOTHR

Project description

mothrpy

GitHub Actions codecov

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


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)

Uploaded Source

Built Distribution

mothrpy-0.3.0-py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page