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

Uploaded Source

Built Distribution

simple_status_client-0.1.3-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file simple_status_client-0.1.3.tar.gz.

File metadata

  • Download URL: simple_status_client-0.1.3.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.10.0 Linux/5.8.0-1042-azure

File hashes

Hashes for simple_status_client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5dba9da076c3e5490937345bda281c3ff31d85922736c0406b80f827fabca3e3
MD5 797267cd666cc5034246bbc0aab4d7c9
BLAKE2b-256 93a4984724f6f39543340b0484d2bbced901e7aebf4db870d4a655f1a4c18111

See more details on using hashes here.

File details

Details for the file simple_status_client-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_status_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7a3f6412918a74a5c4b88eac928506eaa2a6c002eff137f84fd7c0e23060b66a
MD5 d705e9178d42f6480d753fa0a12d67e6
BLAKE2b-256 f1f21c342789f52d4fc9d84360a2cb84c2cada5758336b62b150e546d6011230

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