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:

pip install litemon

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

Uploaded Python 3

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

Hashes for litemon-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b1dbf4edaf2475976fb082382312f09b63cfb6b10c9b9c5d36ae2bdccdc47274
MD5 374513f1d6df2ce07354ab9c66de331d
BLAKE2b-256 5ea56721762a61258801544e41814bab9dfd09bba4db22de537fef4927296a83

See more details on using hashes here.

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

Hashes for litemon-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6ad44e2eda46b8107467656cea6fd77ef364acf0a8b7a44f54499e84ad328f7
MD5 de18dc5723ac127f581ef9ac1c99a08e
BLAKE2b-256 59d9e36eddf5c94cec716b205dbd56a1a153a0e340f41b58b9f58ebc50495432

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