Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trafitto/healthcheck-decorator
The idea is to decorate a function to monitor if it is executed
https://github.com/trafitto/healthcheck-decorator
decorator healtcheck monitoring python
Last synced: about 1 month ago
JSON representation
The idea is to decorate a function to monitor if it is executed
- Host: GitHub
- URL: https://github.com/trafitto/healthcheck-decorator
- Owner: Trafitto
- Created: 2022-09-10T07:55:27.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-20T23:42:32.000Z (about 1 year ago)
- Last Synced: 2024-11-13T23:22:53.258Z (about 1 month ago)
- Topics: decorator, healtcheck, monitoring, python
- Language: Python
- Homepage: https://pypi.org/project/healthcheck-decorator/
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Healthcheck-decorator
The idea is to decorate a function to monitor if it is executed
## How to use
Simply add the decorator to the function you want to monitor
```
from healtcheck_decorator.healthcheck import healthcheck@healthcheck
def test():
pass
```Without any parameters, the decorator adds the function to the monitor using the name of the function itself as a key to save it in the cache.
`@healthcheck(key='TEST-KEY')`
## Monitor
You can check all the function added to monitor with:
`keys = HealthcheckedFunctionMonitor().get()`
HealthcheckedFunctionMonitor is a singleton
More info on the implementation here: [healthcheck-decorator-pip-tester](https://github.com/Trafitto/healthcheck-decorator-pip-tester)
## Tests
Before launching the tests you must make sure you have installed the package with:
`make package_install`
or
`pip install .`
Then you can launch the test:
`make test`
or
`pytest`