API Browser for Flask-DebugToolbar
Project description
Flask-Debug-API is an API Browser for Flask-DebugToolbar.
Injects a form to POST, PUT, PATCH or DELETE to API endpoints and allows debugging SQLAlchemy queries, Werkzeug stack traces, and everything else that Flask-DebugToolbar supports.
Installation
Install with pip
$ pip install Flask-Debug-API
Usage
# Create your app and enable debugging
from flask_todomvc.factory import create_app
from flask_debugtoolbar import DebugToolbarExtension
from flask_debug_api import DebugAPIExtension
app = create_app()
app.debug = True
# Register Flask-DebugToolbar and Flask-Debug-API
DebugToolbarExtension(app)
DebugAPIExtension(app)
# Append Browse API Panel to Flask-DebugToolbar defaults
# (or add explicitly)
config = app.config
panels = list(config['DEBUG_TB_PANELS'])
panels.append('flask_debug_api.BrowseAPIPanel')
config['DEBUG_TB_PANELS'] = panels
# Optional: Change API prefix to custom prefix
# to filter routes in Browse API Panel
# Can leave '' to browse all routes
# (Default is /api)
config['DEBUG_API_PREFIX'] = '/todos'
app.run(port=8000)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-Debug-API-0.1.0.tar.gz
(4.5 kB
view details)
File details
Details for the file Flask-Debug-API-0.1.0.tar.gz
.
File metadata
- Download URL: Flask-Debug-API-0.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3b4c063a3a337359e435f2c85b6ff9602bc0e171fd586c6ae137218353d3405 |
|
MD5 | cc54603a5a75e249a3eb7b67e62e4a0a |
|
BLAKE2b-256 | 76ba600751e7cbc8a9d29d98d24f9965e34f33447bf15f6ddf54107300cb36e1 |