Skip to main content

Flask Debug-toolbar

This is a port of the excellent django-debug-toolbar for Flask applications.

https://travis-ci.org/mgood/flask-debugtoolbar.png?branch=master

Installation

Installing is simple with pip:

$ pip install flask-debugtoolbar

Usage

Setting up the debug toolbar is simple:

from flask import Flask
from flask_debugtoolbar import DebugToolbarExtension

app = Flask(__name__)

# the toolbar is only enabled in debug mode:
app.debug = True

# set a 'SECRET_KEY' to enable the Flask session cookies
app.config['SECRET_KEY'] = '<replace with a secret key>'

toolbar = DebugToolbarExtension(app)

The toolbar will automatically be injected into Jinja templates when debug mode is on. In production, setting app.debug = False will disable the toolbar.

See the documentation for more information.

Changes

0.11.0 (2020-02-18)

Enhancements:

  • Switch to Flask’s native CLI, dropping flask_script in the process (b92391d, thanks @jeffwidman)

  • Do not show DebugToolbar routes in the route map (#86, thanks @floqqi)

  • Document Pygments for SQL highlighting (#127, thanks @pgiraud)

Fixes:

  • Remove deprecated flask.json_available (#119, thanks @davidism)

  • Remove deprecated request.is_xhr (7ce099c, thanks @jeffwidman)

  • Explicitly disable SQLALCHEMY_TRACK_MODIFICATIONS (9c7db48, thanks @jeffwidman)

  • Fix typo (#142, thanks @timgates42)

0.10.1 (2017-02-12)

Enhancements: - Add support for Python wheels

Fixes:

  • Switch imports from deprecated flask.ext.* to flask_* syntax (#94, thanks Michael Lenzen & #97 thanks Iuri de Silvio)

0.10.0 (2015-04-17)

Enhancements:

  • Added new “Routes” panel displaying URL routing rules (#69, thanks Justin McKay)

  • “Versions” panel displays versions of all installed packages (#49, thanks Lucas Taylor)

  • SQLAlchemy displays necessary setup steps to set up query recording

  • Support reformatting SQL queries if sqlparse library is available (#48, thanks Hyunjun Kim)

  • Enable sorting SQLAlchemy queries (#81, thanks Eric Workman)

  • Support inserting toolbar on HTML5 pages without </body> tag

  • Log a warning if unable to insert the toolbar (#20, thanks Rune Halvorsen)

Fixes:

  • Ensure numeric sorting of profiler “Calls” column

0.9.2 (2014-12-05)

Fixes:

  • HTML escape SQL queries when syntax highlighting is not available

  • Use case-insensitive comparison to normalize filenames on Windows

  • Fix exception when SQL query contained non-ASCII characters

0.9.1 (2014-11-24)

Fixes:

  • Fix SQL queries with byte strings on Python 3

  • Fix displaying values whose repr() contains unprintable characters

0.9.0 (2014-01-03)

Enhancements:

  • Python 3 compatibility (#54, thanks justinmayer and jmagnusson)

  • Support .init_app() (#38)

  • New “Config” panel displaying Flask config values (#51, thanks Alexey Diyan)

  • Better PEP8-style formatting (#63, thanks Ivan Ivaschenko)

Fixes:

  • Fix template editor with non-ASCII templates (#46)

0.8 (2013-02-21)

Enhancements:

  • Use itsdangerous to sign SQL queries

  • Expose the jQuery object as fldt.$ so extensions can use the toolbar’s copy of jQuery (#42)

Fixes:

  • Don’t intercept redirects on XHR requests (#41)

  • Fix SQL query time display as milliseconds (#36)

  • Fix functools.partial error (#35)

  • Fix werkzeug request logging with logging panel (#33)

  • Fix SQL panel unicode encoding error (#31)

0.7.1 (2012-05-18)

Fixes:

  • loading template editor in-place over current page

0.7 (2012-05-18)

Enhancements:

  • Add an in-browser template editor to the template panel

  • DEBUG_TB_PROFILER_ENABLED config option to enable the profiler on all requests (normally it is user-enabled by clicking the checkmark)

0.6.3.1 (2012-04-16)

New release to add missing changelog for 0.6.3

0.6.3 (2012-04-16)

Fixes:

  • Compatibility with Flask-SQLAlchemy 0.16 package name

0.6.2 (2012-02-18)

Fixes:

  • Installation issue on Windows with trailing slashes in MANIFEST.in

  • JavaScript error when using conditional comments for <html> tag (like in HTML5 Boilerplate)

0.6.1 (2012-02-15)

Fixes:

  • Memory leak when toolbar was enabled

  • UnicodeDecodeError when request data contained binary data (e.g. session values)

Enhancements:

  • DEBUG_TB_ENABLED config setting to explicitly enable or disable the toolbar

  • DEBUG_TB_HOSTS config setting to enable toolbar only for specific remote hosts

  • New logo for Flask instead of Django

  • Monospaced font on table data

Thanks to kennethreitz and joeshaw for their contributions.

0.6 (2012-01-04)

Flask 0.8 or higher is required

Enhancements:

  • Flask 0.8 compatibility

Thanks to mvantellingen

Release files for Flask-DebugToolbar 0.11.0

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-DebugToolbar 0.11.0
File Size Uploaded
Flask-DebugToolbar-0.11.0.tar.gz 254.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Flask-DebugToolbar 0.11.0
File Interpreter ABI Platform
Flask_DebugToolbar-0.11.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 579.0 kB

Release files / Flask-DebugToolbar-0.11.0.tar.gz

Download URL Flask-DebugToolbar-0.11.0.tar.gz
Size 254.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3c4e79d354ede014e6657c545a536d4fb273cc89e3fd6b4835b02e346dd3aab4
BLAKE2b-256 checksum
How to use checksums
ec2bd84b57b653401de99bdbddce3ad58dd149b57144c8847c773c93230dd6fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release files / Flask_DebugToolbar-0.11.0-py2.py3-none-any.whl

Download URL Flask_DebugToolbar-0.11.0-py2.py3-none-any.whl
Size 325.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0e9a80d4c599233c68376e81cc99976200b5ac5248cfb24f18935cc5b69ac5b3
BLAKE2b-256 checksum
How to use checksums
0e60c3e8de2191ecf78d750d1038ab45195b97a9ee569351865d60d01941bcc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release history Release notifications | RSS feed

0.16.0

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.13.1

2 release files

0.13

3 release files

0.12.1

2 release files

0.12.0

2 release files

This release

0.11.0 This release

2 release files

0.10.1

2 release files

0.10.0

1 release file

0.9.2

1 release file

0.9.1

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.1

1 release file

0.7

1 release file

0.6.3.1

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6

1 release file

0.5

1 release file

0.4.6

1 release file

0.4.5

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.1

1 release file

0.4

1 release file

0.03

1 release file

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