SQLAlchemy querying metrics collection and reporting extension for Flask.
Project description
Flask-Inspektor
SQLAlchemy querying metrics collection and reporting extension for Flask. Heavily influenced by flask-queryinspect.
Installation
For now you have to use the Git repository:
pip install git+https://github.com/getbyrd/inspektor.git#egg=flask-inspektor
Usage
Using eagerly configured Flask application:
from flask import Flask
from flask_inspektor import QueryInspector
app = Flask(__name__)
qi = QueryInspector(app)
Using lazy configuration or application factory pattern:
from flask import Flask
from flask_inspektor import QueryInspector
qi = QueryInspector()
def create_app():
app = Flask(__name__)
qi.init_app(app)
Configuration
Note: Query inspector is not enabled by default.
Variable | Default | Description |
---|---|---|
QUERYINSPECT_ENABLED | False | Activate the extension / react to SQL queries. |
QUERYINSPECT_HEADERS | True | Enable reporting in HTTP response header. |
QUERYINSPECT_LOG | True | Enable reporting in INFO level log message. |
QUERYINSPECT_LOG_DUPES | False | Enable logging of duplicated SQL queries. |
Delivered to you by developers of Byrd.
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-inspektor-0.1.0.tar.gz
(13.9 kB
view hashes)
Built Distribution
Close
Hashes for flask_inspektor-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a87eee2fd75c805e758045dafd173ed108aaa69932b573254f30b98823f30632 |
|
MD5 | 34fcaf184b226de392b81fa35efe2fe6 |
|
BLAKE2b-256 | d07c7805d2f64454214cd6f844284e347273a5a51840297167ca454c006fc15c |