A flask extension to log route latency
Project description
A flask extension to log route latency
Example
app = Flask(__name__)
app.config["SECRET_KEY"] ="your_secret_key"
app.config["DEBUG"] = True
latency_logger = RouteLatencyLogger(app)
@app.route("/")
def index(): return "Hello, World!"
if __name__ == "__main__":
app.run()
response:
[2023-08-10 21:52:54,341] INFO in **init**: Latency for route index:
0.000188 seconds 127.0.0.1 - - [10/Aug/2023 21:52:54] “GET / HTTP/1.1”
200 -
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flask-crlatency-0.0.1.tar.gz
(2.7 kB
view details)
Built Distribution
File details
Details for the file flask-crlatency-0.0.1.tar.gz
.
File metadata
- Download URL: flask-crlatency-0.0.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a17e71bafa4796edbb2884820414efac0f0cd5066656982814c8074d74a5e85c |
|
MD5 | 0923797666d76a9945544de28297b1ef |
|
BLAKE2b-256 | 79a28a2328f175e3cd2ac10bd7975dfd26366421f10854b2c1073b9715395343 |
File details
Details for the file flask_crlatency-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: flask_crlatency-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4a0878d8d13780f35cae82c452bc815397bf4f11a6019bb14d2e2005852b6d5 |
|
MD5 | bfd4de22f07f4fe688f5a84724b6e298 |
|
BLAKE2b-256 | b799c3925c37d799e2b7d89d198324bb326701f0d05b897e7ce3df1b6fb15371 |