Skip to main content

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 directly from GitHub:

pip install git+https://github.com/HabebNawatha/LiteMon.git

Or, if you’re contributing locally:

git clone https://github.com/HabebNawatha/LiteMon.git
cd LiteMon
make install

Quick Start 🏁

  1. Start the LiteMon server
litemon --port 8000
  1. 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)
  1. Monitor Metrics Fetch current metrics:
curl http://127.0.0.1:8000/metrics
  1. 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 ✍️

Habeb Nawatha
🌐 GitHub • 💼 LinkedIn

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

litemon-0.1.2.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

litemon-0.1.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file litemon-0.1.2.tar.gz.

File metadata

  • Download URL: litemon-0.1.2.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for litemon-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0caf9f71527a36d73adaa94551df81bb3ca6408ca541d2cf33f35f5a0ac39590
MD5 897ef642449ebd166b88f29704847b4a
BLAKE2b-256 0eeed4dbecc2b291814c4bad57c29cd08850b3e78ea38e107e91526b74601d5b

See more details on using hashes here.

File details

Details for the file litemon-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: litemon-0.1.2-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

Hashes for litemon-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0b812e49629c387f84528fcbe72c6a59a66e5c84e8141434708e78ba0673bdb1
MD5 2d7368aac7d2492dcac94e111868519d
BLAKE2b-256 25435d89080dc719b7dcdc6c104632fea5c0e4db4ba2d4dce5a3ea171cfe4e9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page