Skip to main content

Track slow Flask routes and monitor bottlenecks

Project description

🐢 Slowpoke

🐢 SLOWPOKE

Slowpoke is a lightweight Python package that helps you monitor and log slow API routes in your Flask application. If you're wondering "Which endpoints are dragging me down?", Slowpoke has your back.


🚀 Installation

Until we publish on PyPI, install directly from GitHub:

pip install git+https://github.com/vedangit/slowpoke.git

⚙️ Usage

1. Add slowpoke to your Flask app

from slowpoke import monitor

app = Flask(__name__)
monitor(app)

The threshold_ms parameter sets the time (in milliseconds) after which a request is considered slow.


2. Run your app normally

Make requests as usual. Slowpoke will track how long each endpoint takes.


3. View the report

Once you've made some requests, generate a report from the command line:

slowpoke report

This will print a table of all routes that exceeded the threshold, including method, endpoint, duration, and timestamp.


🧪 Example App

You can test out slowpoke quickly by running the example Flask app:

cd examples
python app.py

Then hit some routes and run:

slowpoke report

🛣️ Roadmap

✅ Version 0 (Current):

  • Log all Flask routes that exceed a threshold.
  • CLI tool to view slow route report.

🔜 Version 1 (Coming soon):

  • Middleware-based integration.
  • Save reports to file.
  • Optional integration with logging tools.
  • FastAPI + Django support.

🧠 Why Slowpoke?

  • 🚀 Fast to integrate
  • 🔍 Focused on performance bottlenecks
  • 🧼 Clean CLI reporting
  • 💻 Perfect for side projects or production

👩‍💻 Author

Made with ❤️ by Vedangi


📄 License

MIT License

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

slowpoke_flask-0.1.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

slowpoke_flask-0.1.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slowpoke_flask-0.1.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for slowpoke_flask-0.1.1.tar.gz
Algorithm Hash digest
SHA256 07394121f770713d657584822e6986d350293fe2242c8c56afb72b32de49d480
MD5 01bb0cef331f1d0a46e9b4b99abf98f4
BLAKE2b-256 b009fa6b857a30b63cc79bd0188211d49a2c8167c8f574513e8cf805a42735fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slowpoke_flask-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for slowpoke_flask-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4cfd332b075bb6a9e068444465a15ed2973b1a79eae8166501b79fbe9886c00
MD5 63ab453de8b3216351e718b6ee9845b7
BLAKE2b-256 3a66ecc023c01ff314318e19d80f73854e5f7c41e12399ac493bc695ea337451

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