Multi process monitor
This is a small helper library intended for monitoring multiple processes outputting the same data set, visualizing it in a ncurses table.
Example: Multiple scrapers processing different URLs logging their progress to one central monitoring entity.
Installation
pip install clientmonitor
Usage
This library consists of a server and a client. The Server accepts connections from clients and prints data received from the clients.
The clients expect the server to be running before connecting.
Running the server
Port and secret are mandatory, host is optional and only relevant if server and client are not being run on the same machine.
from clientmonitor.Server import Server
server = Server(6666, "secret", host="localhost")
server.set_columns([
{
"key": "key1",
"label": "Label for Key 1"
},
{
"key": "key2",
"label": "Label for Key 2"
}
])
server.start()
# CTRL-C to stop
The columns being set are the columns that are expected to be received as data from the clients and are what the server will print.
Running the client
import time
from clientmonitor.Client import Client
client = Client("client-1", 6666, "secret")
client.connect()
for i in range(0, 5):
client.send({
"key1": 100 + i,
"key2": 200 + i,
})
time.sleep(5)
client.close()
Development
Pull request are welcome, pleas address them against the develop branch.
Publish
python -m build
python3 -m twine upload --repository testpypi dist/*
Metadata
Release files for clientmonitor 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| clientmonitor-0.1.0.tar.gz | 4.6 kB | Without provenance | Details for clientmonitor-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clientmonitor-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for clientmonitor-0.1.0-py3-none-any.whl |
Total release size: 10.4 kB
Release files / clientmonitor-0.1.0.tar.gz
| Download URL | clientmonitor-0.1.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22c869a22ab5851b39b1c2c0a8da838d09408e6fabf6fae08a743a9d69683dfe
|
|
BLAKE2b-256 checksum How to use checksums |
91e2e1ebeab7f7f86ef500afb2c7f7b1e52e38f32ff7ad04b91e4bad098dc472
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.2
|
Release files / clientmonitor-0.1.0-py3-none-any.whl
| Download URL | clientmonitor-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
456508526133e602c1a38af30acbf661accc7bc0e469cf0a1a1d9cdcf3389a39
|
|
BLAKE2b-256 checksum How to use checksums |
6b6605187940a4772486f192c6ddaaf375810a722f1c552077751974fe93514b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.2
|
Security for clientmonitor 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.