Skip to main content

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')

License

Licensed under the MIT license.

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

andonapp-1.0.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

andonapp-1.0.0-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file andonapp-1.0.0.tar.gz.

File metadata

  • Download URL: andonapp-1.0.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for andonapp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3dcd3b919152ae057ea5ad7c1066e2bd568f890eb63d873159657789a36dc502
MD5 0094bd8ebb84de5c113eac9c1bf09156
BLAKE2b-256 9b54dfdb5e4dd2c924a80f77e2e998a6049e877f6cda74a0c9455a0feec8115a

See more details on using hashes here.

File details

Details for the file andonapp-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for andonapp-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d4a2b3a7a0bac489f36563d11a7444d9103040f35afcb12fa41e6c5bc08dcb51
MD5 b36b250d11cddb876e17095c6a5cff74
BLAKE2b-256 414e6c943b85e02405e1d5e453e8cb76093a3c5733904bff96da37f40d647c95

See more details on using hashes here.

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