Name | litemon JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | LiteMon β A lightweight Python function monitoring tool with live metrics. |
upload_time | 2025-08-27 16:49:11 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
monitoring
metrics
decorator
dashboard
python
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# LiteMon π
A lightweight Python function monitoring client decorator & standalone metrics server.
# Overview π
LiteMon is a zeroβconfig, lightweight monitoring tool that tracks your Python function calls, execution times, and performance metrics in real time.
It comes with a metrics server live dashboard where you can visualize and analyze metrics instantly.
## Features β¨
- π Live Dashboard β view real-time metrics at /metrics
- β‘ Lightweight β no heavy dependencies, minimal config
- π§© Zero Intrusion β just decorate your functions and monitor them
- π§Ή Reset Support β clear metrics instantly via /reset
- π§βπ» Developer Friendly β perfect for debugging, profiling, and demos
## Installation π§
Install LiteMon:
```bash
pip install litemon
```
Or, if youβre contributing locally:
```bash
git clone https://github.com/HabebNawatha/LiteMon.git
cd LiteMon
make install
```
## Quick Start π
1. Start the LiteMon server
```bash
litemon --port 8000
```
2. Use LiteMon in your App
```python
from flask import Flask
from litemon import configure_client, monitor
app = Flask(__name__)
# Configure LiteMon client to push metrics to the server
configure_client(server_url="http://127.0.0.1:8000", push_interval=2)
@monitor
def greet():
return "Hello! Welcome to the server."
@monitor
def bye():
return "Goodbye! See you soon."
@app.route('/greet', methods=['GET'])
def greet_route():
return greet()
@app.route('/bye', methods=['GET'])
def bye_route():
return bye()
if __name__ == '__main__':
app.run(port=5050, debug=True)
```
3. Monitor Metrics
Fetch current metrics:
```bash
curl http://127.0.0.1:8000/metrics
```
* Your Flask app β http://127.0.0.1:5050
* LiteMon metrics dashboard β http://127.0.0.1:8000/metrics
4. Reset Metrics
Clear all collected metrics:
```bash
curl -X POST http://127.0.0.1:8000/reset
```
## Metrics Dashboard π
LiteMonβs metrics displays:
- Function call counts
- Average execution times
- Error counts
- Real-time performance tracking
Example output:
```json
{
"greet": {
"calls": 12,
"success":12,
"failures":0,
"avg_time": 3.21
},
"bye": {
"calls": 12,
"success":12,
"failures":0,
"avg_time": 1.84
}
}
```
## Why LiteMon? π€
- β‘ **Lightweight** β minimal dependencies.
- π§© **Easy to Use** β add a simple decorator and run the litemon server.
- π **Live Metrics** β instantly see function calls and timings.
- π **Decoupled** β reuse the same server for multiple apps.
- π **Developer Friendly** β flexible, perfect for debugging and profiling.
## Contributing π€
We welcome contributions!
- Fork the repo
- Commit your changes
- Open a Pull Request π
## Author βοΈ
**Habeb Nawatha**
π [GitHub](https://github.com/HabebNawatha) β’ πΌ [LinkedIn](https://www.linkedin.com/in/habeb-nawatha/)
Raw data
{
"_id": null,
"home_page": null,
"name": "litemon",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "monitoring, metrics, decorator, dashboard, python",
"author": null,
"author_email": "Habeb Nawatha <habeb.naw@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/5e/a5/6721762a61258801544e41814bab9dfd09bba4db22de537fef4927296a83/litemon-0.2.0.tar.gz",
"platform": null,
"description": "# LiteMon \ud83d\udcca\nA lightweight Python function monitoring client decorator & standalone metrics server.\n\n# Overview \ud83d\ude80\nLiteMon is a zero\u2011config, lightweight monitoring tool that tracks your Python function calls, execution times, and performance metrics in real time.\nIt comes with a metrics server live dashboard where you can visualize and analyze metrics instantly.\n## Features \u2728\n\n- \ud83d\udcc8 Live Dashboard \u2013 view real-time metrics at /metrics\n- \u26a1 Lightweight \u2013 no heavy dependencies, minimal config\n- \ud83e\udde9 Zero Intrusion \u2013 just decorate your functions and monitor them\n- \ud83e\uddf9 Reset Support \u2014 clear metrics instantly via /reset\n- \ud83e\uddd1\u200d\ud83d\udcbb Developer Friendly \u2013 perfect for debugging, profiling, and demos\n\n\n## Installation \ud83d\udd27\n\nInstall LiteMon:\n\n```bash\npip install litemon\n```\n\nOr, if you\u2019re contributing locally:\n\n```bash\ngit clone https://github.com/HabebNawatha/LiteMon.git\ncd LiteMon\nmake install\n```\n## Quick Start \ud83c\udfc1\n1. Start the LiteMon server\n```bash\nlitemon --port 8000\n```\n2. Use LiteMon in your App\n```python\nfrom flask import Flask\nfrom litemon import configure_client, monitor\n\napp = Flask(__name__)\n\n# Configure LiteMon client to push metrics to the server\nconfigure_client(server_url=\"http://127.0.0.1:8000\", push_interval=2)\n\n@monitor\ndef greet():\n return \"Hello! Welcome to the server.\"\n\n@monitor\ndef bye():\n return \"Goodbye! See you soon.\"\n\n@app.route('/greet', methods=['GET'])\ndef greet_route():\n return greet()\n\n@app.route('/bye', methods=['GET'])\ndef bye_route():\n return bye()\n\nif __name__ == '__main__':\n app.run(port=5050, debug=True)\n```\n\n3. Monitor Metrics\nFetch current metrics:\n```bash\ncurl http://127.0.0.1:8000/metrics\n```\n* Your Flask app \u2192 http://127.0.0.1:5050\n* LiteMon metrics dashboard \u2192 http://127.0.0.1:8000/metrics\n\n4. Reset Metrics\nClear all collected metrics:\n```bash\ncurl -X POST http://127.0.0.1:8000/reset\n```\n## Metrics Dashboard \ud83d\udcca\nLiteMon\u2019s metrics displays:\n- Function call counts\n- Average execution times\n- Error counts\n- Real-time performance tracking\nExample output:\n\n```json\n{\n \"greet\": {\n \"calls\": 12,\n \"success\":12,\n \"failures\":0,\n \"avg_time\": 3.21\n },\n \"bye\": {\n \"calls\": 12,\n \"success\":12,\n \"failures\":0,\n \"avg_time\": 1.84\n }\n}\n```\n## Why LiteMon? \ud83e\udd14\n- \u26a1 **Lightweight** \u2013 minimal dependencies.\n- \ud83e\udde9 **Easy to Use** \u2013 add a simple decorator and run the litemon server.\n- \ud83d\udcca **Live Metrics** \u2013 instantly see function calls and timings.\n- \ud83d\udd0c **Decoupled** \u2014 reuse the same server for multiple apps.\n- \ud83d\udee0 **Developer Friendly** \u2013 flexible, perfect for debugging and profiling.\n\n\n\n## Contributing \ud83e\udd1d\nWe welcome contributions!\n- Fork the repo\n- Commit your changes\n- Open a Pull Request \ud83c\udf89\n\n\n\n## Author \u270d\ufe0f\n**Habeb Nawatha** \n\ud83c\udf10 [GitHub](https://github.com/HabebNawatha) \u2022 \ud83d\udcbc [LinkedIn](https://www.linkedin.com/in/habeb-nawatha/)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "LiteMon \u2014 A lightweight Python function monitoring tool with live metrics.",
"version": "0.2.0",
"project_urls": null,
"split_keywords": [
"monitoring",
" metrics",
" decorator",
" dashboard",
" python"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "59d9e36eddf5c94cec716b205dbd56a1a153a0e340f41b58b9f58ebc50495432",
"md5": "de18dc5723ac127f581ef9ac1c99a08e",
"sha256": "a6ad44e2eda46b8107467656cea6fd77ef364acf0a8b7a44f54499e84ad328f7"
},
"downloads": -1,
"filename": "litemon-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "de18dc5723ac127f581ef9ac1c99a08e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8048,
"upload_time": "2025-08-27T16:49:10",
"upload_time_iso_8601": "2025-08-27T16:49:10.184675Z",
"url": "https://files.pythonhosted.org/packages/59/d9/e36eddf5c94cec716b205dbd56a1a153a0e340f41b58b9f58ebc50495432/litemon-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5ea56721762a61258801544e41814bab9dfd09bba4db22de537fef4927296a83",
"md5": "374513f1d6df2ce07354ab9c66de331d",
"sha256": "b1dbf4edaf2475976fb082382312f09b63cfb6b10c9b9c5d36ae2bdccdc47274"
},
"downloads": -1,
"filename": "litemon-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "374513f1d6df2ce07354ab9c66de331d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 10000,
"upload_time": "2025-08-27T16:49:11",
"upload_time_iso_8601": "2025-08-27T16:49:11.351229Z",
"url": "https://files.pythonhosted.org/packages/5e/a5/6721762a61258801544e41814bab9dfd09bba4db22de537fef4927296a83/litemon-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-27 16:49:11",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "litemon"
}