Skip to main content

A package for interacting with the Simple Status Server

Project description

SimpleStatusClient

A helper Client library in Python for the SimpleStatus project

Getting Started

Ensure you have pulled SimpleStatusServer and are running it (preferably straight from docker)

  • pip install simple_status_client
  • cd SimpleStatusClient
  • python -m pip install . _(this should be the python environment in which your stasus needing code runs)
  • Within the code that you wish to send statuses do the following
    • from simple_status_client import Client, Colors
    • client = APIClient("http://*server_ip*/api") server_ip should be the ip address of your docker container
    • client.setConfig() -- fill in params
    • client.setStatus() -- fill in params

Voila, you should be able to view your status on the dashboard.

Example Usage

client.set_config("My Component","This is the thingamabob for our whatsamaahousit server", 0, Colors.yellow)

  • <Response [200]>

client.set_status("My Component",Colors.green,"All systems go")

  • <Response [200]>

Things to keep in mind

  • Components are identified by ID, which is calculated by hashing the name (or by calling the base functions and providing it directly e.g. APIClient.set_status_base).
    • DUPLICATE NAMES OVERWRITE.
    • This is by design, if you want to update your configuration and or status you can do it without jumping through any hoops. Simply send a new configuration or status. That being said if you have code in multiple places using the same id... they will be stepping on each other
  • This library is provided as a convenience, the REST API is full accessible and you can write your own interface if you would like.
    • I promise to keep this library up to date and working to the best of my ability. Maybe I'll even write tests for it.

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

simple_status_client-0.1.3.tar.gz (16.8 kB view hashes)

Uploaded Source

Built Distribution

simple_status_client-0.1.3-py3-none-any.whl (29.7 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