flask-crlatency (flask-check-route-latency)
===========================================
A flask extension to log route latency
Example
-------
.. code:: py
from flask import Flask
from flask_crlatency import RouteLatencyLogger
app = Flask(__name__)
app.config["SECRET_KEY"] ="your_secret_key"
app.config["DEBUG"] = True
app.config["MAX_ROUTE_LATENCY"] = 0.1
latency_logger = RouteLatencyLogger(app)
@app.route("/")
def index():
return "Hello, World!"
if __name__ == "__main__":
app.run()
response:
[2023-08-19 10:00:58,654] WARNING in __init__: High latency for route index: 3.001345 seconds
127.0.0.1 - - [19/Aug/2023 10:00:58] "GET / HTTP/1.1" 200 -
Raw data
{
"_id": null,
"home_page": "https://github.com/Agent-Hellboy/flask-crlatency",
"name": "flask-crlatency",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "flask-extension,log-route-latency",
"author": "Prince Roshan",
"author_email": "princekrroshan01@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/13/d2/32002828132fc69aff11781216a1c37532c84c4c88ce0bcef8d130401e33/flask-crlatency-0.0.2.tar.gz",
"platform": null,
"description": "flask-crlatency (flask-check-route-latency)\n===========================================\n\nA flask extension to log route latency\n\nExample\n-------\n\n.. code:: py \n\n from flask import Flask \n from flask_crlatency import RouteLatencyLogger\n\n app = Flask(__name__) \n app.config[\"SECRET_KEY\"] =\"your_secret_key\" \n app.config[\"DEBUG\"] = True\n app.config[\"MAX_ROUTE_LATENCY\"] = 0.1\n \n latency_logger = RouteLatencyLogger(app)\n \n @app.route(\"/\") \n def index(): \n return \"Hello, World!\"\n\n if __name__ == \"__main__\": \n app.run()\n\n response:\n \n [2023-08-19 10:00:58,654] WARNING in __init__: High latency for route index: 3.001345 seconds\n 127.0.0.1 - - [19/Aug/2023 10:00:58] \"GET / HTTP/1.1\" 200 -\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A flask extension to log route latency",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/Agent-Hellboy/flask-crlatency"
},
"split_keywords": [
"flask-extension",
"log-route-latency"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "40072bbda4461069a85a2f57d301d7639599c86e427fb97e3cb31a4feea9ce79",
"md5": "1cc7559e0551617989f22e52d52f8f42",
"sha256": "df8b793247317654a4dfb3ea8d7334f18f551f62acf41ab0b76f5ec4dfb4664f"
},
"downloads": -1,
"filename": "flask_crlatency-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1cc7559e0551617989f22e52d52f8f42",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 2989,
"upload_time": "2023-08-19T04:33:45",
"upload_time_iso_8601": "2023-08-19T04:33:45.018597Z",
"url": "https://files.pythonhosted.org/packages/40/07/2bbda4461069a85a2f57d301d7639599c86e427fb97e3cb31a4feea9ce79/flask_crlatency-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "13d232002828132fc69aff11781216a1c37532c84c4c88ce0bcef8d130401e33",
"md5": "1403135b455e88f937d01a2e79496b4d",
"sha256": "d0f71af7a26d7da9ae12dfbcc5e8b9248ca0a8250432a22a94f53b02e122dea7"
},
"downloads": -1,
"filename": "flask-crlatency-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "1403135b455e88f937d01a2e79496b4d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 2669,
"upload_time": "2023-08-19T04:33:49",
"upload_time_iso_8601": "2023-08-19T04:33:49.168476Z",
"url": "https://files.pythonhosted.org/packages/13/d2/32002828132fc69aff11781216a1c37532c84c4c88ce0bcef8d130401e33/flask-crlatency-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-19 04:33:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Agent-Hellboy",
"github_project": "flask-crlatency",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "flask-crlatency"
}