LiteMon — A lightweight Python function monitoring tool with live metrics.
Project description
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:
pip install litemon
Or, if you’re contributing locally:
git clone https://github.com/HabebNawatha/LiteMon.git
cd LiteMon
make install
Quick Start 🏁
- Start the LiteMon server
litemon --port 8000
- Use LiteMon in your App
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)
- Monitor Metrics Fetch current metrics:
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
- Reset Metrics Clear all collected metrics:
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:
{
"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 ✍️
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file litemon-0.2.0.tar.gz.
File metadata
- Download URL: litemon-0.2.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1dbf4edaf2475976fb082382312f09b63cfb6b10c9b9c5d36ae2bdccdc47274
|
|
| MD5 |
374513f1d6df2ce07354ab9c66de331d
|
|
| BLAKE2b-256 |
5ea56721762a61258801544e41814bab9dfd09bba4db22de537fef4927296a83
|
File details
Details for the file litemon-0.2.0-py3-none-any.whl.
File metadata
- Download URL: litemon-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6ad44e2eda46b8107467656cea6fd77ef364acf0a8b7a44f54499e84ad328f7
|
|
| MD5 |
de18dc5723ac127f581ef9ac1c99a08e
|
|
| BLAKE2b-256 |
59d9e36eddf5c94cec716b205dbd56a1a153a0e340f41b58b9f58ebc50495432
|