Skip to main content

Flask-Perf

PyPI version Build Status Coverage Status

A simple Flask extension for profiling your application code and database queries.

Installation

$ pip install flask_perf

Example

from flask import Flask, jsonify
from flask_perf import Profiler

app = Flask(__name__)
app.config["PROFILER_ENABLED"] = True
profiler = Profiler(app) # or profiler.init_app(app)

@app.route("/")
def index():
    return jsonfiy({
        "message": "Hello World!"
    })

Configuration

Config Name Description default
PROFILER_ENABLED Enable the profiler. False
PROFILER_RESTRICTIONS List of profiler restrictions, described in depth in the Official Python Docs []
PROFILER_SQLALCHEMY_ENABLED Enable SQLAlchemy query logging. Note: This option requires that the flask_sqlalchemy package is installed and the SQLALCHEMY_RECORD_QUERIES config option is set to True. False
PROFILER_SQLALCHEMY_THRESHOLD Minimum query duration in seconds to log. 0
PROFILER_SQLALCHEMY_FORMAT Logged SQLAlchemy query format. See the Flask-SQLAlchemy docs for a list of attributes you can use in this format string. "\n\n{duration:1.2e}s\n\n{statement}\n"

Links

Metadata

Release files for Flask-Perf 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Flask-Perf 0.1.6
File Size Uploaded Provenance
Flask-Perf-0.1.6.tar.gz 3.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for Flask-Perf 0.1.6
File Interpreter ABI Platform
Flask_Perf-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 6.1 kB

Release files / Flask-Perf-0.1.6.tar.gz

Download URL Flask-Perf-0.1.6.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9357986f9793f366d4d3cfbbd58a6f0b1013f02c705a1006b282a3addceb62a0
BLAKE2b-256 checksum
How to use checksums
da35feeac52ce12586a6063f31097134856268159491971b1afb65643761c545
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.4

Release files / Flask_Perf-0.1.6-py3-none-any.whl

Download URL Flask_Perf-0.1.6-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce1315c92eb44eb4dff05d3a47bcaca2912588062c1068f44d746fc412896aa2
BLAKE2b-256 checksum
How to use checksums
d68f141cad090264bff340069d3e367f7c16318e334aa411a0d9a294a329021f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.4

Security for Flask-Perf 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page