Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Python client for communicating with Andon.

Project description

Python client library for reporting data to Andon

Install

pip install andonapp

Usage

In order to programmatically connect to Andon’s APIs you must first generate an API token. This is done by logging into your Andon account, navigating to the API settings page, and generating a new token. Make sure to record the token, and keep it secret.

Reference Andon’s getting started guide and API guide for complete details on these prerequisites

Setting up the Client

Now that you have a token, create a client as follows:

from andonapp import AndonAppClient

client = AndonAppClient(org_name, api_token)

Reporting Data

Here’s an example of using the client to report a success:

client.report_data(
    line_name='line 1',
    station_name='station 1',
    pass_result='PASS',
    process_time_seconds=100)

And a failure:

client.report_data(
    line_name='line 1',
    station_name='station 1',
    pass_result='FAIL',
    process_time_seconds=100,
    fail_reason='Test Failure',
    fail_notes='notes')

Updating a Station Status

Here’s an example of flipping a station to Red:

client.update_station_status(
    line_name='line 1',
    station_name='station 1',
    status_color='RED',
    status_reason='Missing parts',
    status_notes='notes')

And back to Green:

client.update_station_status(
    line_name='line 1',
    station_name='station 1',
    status_color='GREEN')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for andonapp, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size andonapp-1.0.0-py2.py3-none-any.whl (6.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size andonapp-1.0.0.tar.gz (5.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page