Metadata-Version: 2.1
Name: flask-inspektor
Version: 0.1.1
Summary: SQLAlchemy querying metrics collection and reporting extension for Flask.
Home-page: https://github.com/getbyrd/inspektor
Author: Byrd Technologies GmbH
Author-email: developers@getbyrd.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Environment :: Web Environment
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Description-Content-Type: text/markdown
Requires-Dist: flask (>=1.0)
Requires-Dist: future (>=0.16.0)
Requires-Dist: SQLAlchemy (>=1.2.2)
Provides-Extra: dev
Requires-Dist: Flask-SQLAlchemy (<2.5.0,>=2.4.0) ; extra == 'dev'
Requires-Dist: flask-testing (>=0.7.1) ; extra == 'dev'
Requires-Dist: pytest (>=4.6.0) ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'
Provides-Extra: test
Requires-Dist: Flask-SQLAlchemy (<2.5.0,>=2.4.0) ; extra == 'test'
Requires-Dist: flask-testing (>=0.7.1) ; extra == 'test'
Requires-Dist: pytest (>=4.6.0) ; extra == 'test'

![CircleCI](https://img.shields.io/circleci/build/github/getbyrd/inspektor/master)
![PyPI - License](https://img.shields.io/pypi/l/flask-inspektor)
![PyPI](https://img.shields.io/pypi/v/flask-inspektor)

# Flask-Inspektor
SQLAlchemy querying metrics collection and reporting extension for Flask.
Heavily influenced by [flask-queryinspect](https://github.com/noise/flask-queryinspect).

[![image](./icon.jpg)](https://www.flickr.com/photos/veryveryquiet)

## Installation

For now you have to use the Git repository:

```bash
pip install git+https://github.com/getbyrd/inspektor.git#egg=flask-inspektor
```


## Usage

Using eagerly configured Flask application:

```python
from flask import Flask
from flask_inspektor import QueryInspector

app = Flask(__name__)
qi = QueryInspector(app)
```

Using lazy configuration or application factory pattern:

```python
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](mailto:developers@getbyrd.com) of [Byrd](https://getbyrd.com).


