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
- or clone library SimpleStatusClient
- 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 containerclient.setConfig()
-- fill in paramsclient.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
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dba9da076c3e5490937345bda281c3ff31d85922736c0406b80f827fabca3e3 |
|
MD5 | 797267cd666cc5034246bbc0aab4d7c9 |
|
BLAKE2b-256 | 93a4984724f6f39543340b0484d2bbced901e7aebf4db870d4a655f1a4c18111 |
File details
Details for the file simple_status_client-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: simple_status_client-0.1.3-py3-none-any.whl
- Upload date:
- Size: 29.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.10.0 Linux/5.8.0-1042-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a3f6412918a74a5c4b88eac928506eaa2a6c002eff137f84fd7c0e23060b66a |
|
MD5 | d705e9178d42f6480d753fa0a12d67e6 |
|
BLAKE2b-256 | f1f21c342789f52d4fc9d84360a2cb84c2cada5758336b62b150e546d6011230 |