Git Auto Backup
This module is intended to be imported into any script requiring a simple HTTP status reporting page.
This optionally supports threading as well, defining the run_threaded and make_thread methods.
Setup
This module can be installed using:
pip install simplestatusserver
Module Interface
This module only contains a single (fully documented) class: SimpleStatusServer.
This cass can be instantiated to generate and when desired, run, a simple HTTP server.
This server will report the data contained within that instance's status attribute as json.
The instance itself may also be used as a dictionary, passing along all the data contained withing its status
If the threading module is imported (which can be checked using the module's STATUS_SERVER_THREADING_POSSIBLE constant), threading related running methods are also defined for this class.
Refer to the docstrings for each method for more information.
This module contains type hints.
Example
from simplestatusserver import SimpleStatusServer, STATUS_SERVER_THREADING_POSSIBLE as THREADING_POSSIBLE
#Note: this example presumes that the threading module is available!
assert THREADING_POSSIBLE, "The threading module must be available for this example to work!"
#some code here...
server = SimpleStatusServer(init_status = {"hello": "world"})
server["world"] == "hello" #returns True
server["status"] = "starting..."
#now run the http server
server.run_threaded(debug = True)
#perhaps a startup routine here?
server["status"] = "running"
del server["world"] #lets remove this key...
try:
#the main part of a script here...
pass
except Exception as e:
server["error"] = str(e)
server["error code"] = 1
#finish off things here...
print("all done!")
Licence
This is licensed under the Mozilla Public License 2.0 (MPL 2.0) Licence. See the Licence file in this repository for more information.
Credits
This project uses the flask python module, and may also make use of the typing-extentions module for older python versions.
While not required, feel free to credit "Markus Hammer" (or just "Markus") if you find this code or script useful for whatever you may be doing with it.
Thanks!
Security Policy
While the python source code will be actively maintained, any binary files (if at all provided) are in no way supported. These are provided as a courtesy and are not intended to be the main usage of this software. Please keep this in mind when choosing how you wish to use this software.
Supported Versions
| Version | Supported |
|---|---|
| 1.0.0.0 >= | ✅ |
| 1.0.0.0 < | ❌ |
Reporting a Vulnerability
Please report any issues to the email 107761433+MarkusHammer(THEN THE @ SYMBOL HERE)users.noreply.github.com
Metadata
Release files for simplestatusserver 1.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 |
|---|---|---|---|---|
| simplestatusserver-1.0.1.0.tar.gz | 9.4 kB | Without provenance | Details for simplestatusserver-1.0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simplestatusserver-1.0.1.0-py3-none-any.whl | Python 3 | none | any | Details for simplestatusserver-1.0.1.0-py3-none-any.whl |
Total release size: 18.6 kB
Release files / simplestatusserver-1.0.1.0.tar.gz
| Download URL | simplestatusserver-1.0.1.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6302dc7ede62667cf6a146d89b65e92123c1e280ca34dd1e6b82588bfa2fdabe
|
|
BLAKE2b-256 checksum How to use checksums |
a6a524726b4192bedaec1afc4476db5ed7e1ddc665ad8037e8d1ee3716e717ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / simplestatusserver-1.0.1.0-py3-none-any.whl
| Download URL | simplestatusserver-1.0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f1d2e33280b2e94f42163f7669a3176b1bbc6d34126aa874703019620f431cd
|
|
BLAKE2b-256 checksum How to use checksums |
7bfc44bd0cba3cf9cd933e2c76f0c162d6d288072b7586c6737272e8f3af91cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for simplestatusserver 1.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.