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

Uploaded Python 3

File details

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

File metadata

  • Download URL: litemon-0.1.1.tar.gz
  • Upload date:
  • Size: 10.2 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.1.tar.gz
Algorithm Hash digest
SHA256 6af3f34e6f47f15c78ea706a7fee100109f3a538437e2e6999119e7862f450eb
MD5 8ffb15f48906ac2440d827d7fe65524b
BLAKE2b-256 5a9478199f98abaf46ec7a099d19d7763ffbd08b4d0008e6cbe49dbc28c383d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: litemon-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33605ff7022902f366b36ee36ddc180860f3ec39b1041044407b85c19d5b28cc
MD5 47724f1915965df937df38efa6d4c608
BLAKE2b-256 279140d67f63f8da3eab598ea46815c295fdcf5d53ebd87bf5f19866d4ccb352

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