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.0.tar.gz (10.1 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.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for litemon-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1bd0b32de639cb770fa08ab74e321465208ceb971dd3e2d2b65eb97cc793d3af
MD5 a95194c409b7a2008345a9d26f967432
BLAKE2b-256 290f00ec0622ca4293feb70b88b7e7075ebc916368ef11142a472d202e025776

See more details on using hashes here.

File details

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

File metadata

  • Download URL: litemon-0.1.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.13.4

File hashes

Hashes for litemon-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33f9c305fd3af70b5310d4fac9f0314f5037573e7b316728124f0b41a86cde0c
MD5 d326bfeaf36c9524648cd87d112a48a6
BLAKE2b-256 18b88d1d31212902bcd033b278b5acc9aa0aa54cb9d6ecbcdc869e139555d4be

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