# ![FastAPI](https://raw.githubusercontent.com/mongkok/fastapi-debug-toolbar/main/debug_toolbar/statics/img/icon-green.svg) Debug Toolbar
<p align="center">
<a href="https://fastapi-debug-toolbar.domake.io">
<img src="https://user-images.githubusercontent.com/5514990/131232994-621774a8-1662-468d-87d8-2199b93387d6.gif" alt="FastAPI Debug Toolbar">
</a>
</p>
<p align="center">
<em>🐞A debug toolbar for FastAPI based on the original django-debug-toolbar.🐞</em>
<br><em><b>Swagger UI</b> & <b>GraphQL</b> are supported.</em>
</p>
<p align="center">
<a href="https://github.com/mongkok/fastapi-debug-toolbar/actions">
<img src="https://github.com/mongkok/fastapi-debug-toolbar/actions/workflows/test-suite.yml/badge.svg" alt="Test">
</a>
<a href="https://codecov.io/gh/mongkok/fastapi-debug-toolbar">
<img src="https://img.shields.io/codecov/c/github/mongkok/fastapi-debug-toolbar?color=%2334D058" alt="Coverage">
</a>
<a href="https://www.codacy.com/gh/mongkok/fastapi-debug-toolbar/dashboard">
<img src="https://app.codacy.com/project/badge/Grade/e9d8ba3973264424a3296016063b4ab5" alt="Codacy">
</a>
<a href="https://pypi.org/project/fastapi-debug-toolbar">
<img src="https://img.shields.io/pypi/v/fastapi-debug-toolbar" alt="Package version">
</a>
</p>
---
**Documentation**: [https://fastapi-debug-toolbar.domake.io](https://fastapi-debug-toolbar.domake.io)
---
## Installation
```sh
pip install fastapi-debug-toolbar
```
## Quickstart
Add `DebugToolbarMiddleware` middleware to your FastAPI application:
```py
from debug_toolbar.middleware import DebugToolbarMiddleware
from fastapi import FastAPI
app = FastAPI(debug=True)
app.add_middleware(DebugToolbarMiddleware)
```
## SQLAlchemy
Please make sure to use the *"Dependency Injection"* system as described in the [FastAPI docs](https://fastapi.tiangolo.com/tutorial/sql-databases/#create-a-dependency) and add the `SQLAlchemyPanel` to your panel list:
```py
app.add_middleware(
DebugToolbarMiddleware,
panels=["debug_toolbar.panels.sqlalchemy.SQLAlchemyPanel"],
)
```
## Tortoise ORM
Add the `TortoisePanel` to your panel list:
```py
app.add_middleware(
DebugToolbarMiddleware,
panels=["debug_toolbar.panels.tortoise.TortoisePanel"],
)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "fastapi-debug-toolbar",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "debug, fastapi, profiling",
"author": null,
"author_email": "Dani <dani@domake.io>",
"download_url": "https://files.pythonhosted.org/packages/ac/e6/c228493e929eeb2b9e61806a63e78c3c0bec4e22ddee99f321ffba4fa64a/fastapi_debug_toolbar-0.6.3.tar.gz",
"platform": null,
"description": "# ![FastAPI](https://raw.githubusercontent.com/mongkok/fastapi-debug-toolbar/main/debug_toolbar/statics/img/icon-green.svg) Debug Toolbar\n\n<p align=\"center\">\n <a href=\"https://fastapi-debug-toolbar.domake.io\">\n <img src=\"https://user-images.githubusercontent.com/5514990/131232994-621774a8-1662-468d-87d8-2199b93387d6.gif\" alt=\"FastAPI Debug Toolbar\">\n </a>\n</p>\n<p align=\"center\">\n <em>\ud83d\udc1eA debug toolbar for FastAPI based on the original django-debug-toolbar.\ud83d\udc1e</em>\n <br><em><b>Swagger UI</b> & <b>GraphQL</b> are supported.</em>\n</p>\n<p align=\"center\">\n <a href=\"https://github.com/mongkok/fastapi-debug-toolbar/actions\">\n <img src=\"https://github.com/mongkok/fastapi-debug-toolbar/actions/workflows/test-suite.yml/badge.svg\" alt=\"Test\">\n </a>\n <a href=\"https://codecov.io/gh/mongkok/fastapi-debug-toolbar\">\n <img src=\"https://img.shields.io/codecov/c/github/mongkok/fastapi-debug-toolbar?color=%2334D058\" alt=\"Coverage\">\n </a>\n <a href=\"https://www.codacy.com/gh/mongkok/fastapi-debug-toolbar/dashboard\">\n <img src=\"https://app.codacy.com/project/badge/Grade/e9d8ba3973264424a3296016063b4ab5\" alt=\"Codacy\">\n </a>\n <a href=\"https://pypi.org/project/fastapi-debug-toolbar\">\n <img src=\"https://img.shields.io/pypi/v/fastapi-debug-toolbar\" alt=\"Package version\">\n </a>\n</p>\n\n\n---\n\n**Documentation**: [https://fastapi-debug-toolbar.domake.io](https://fastapi-debug-toolbar.domake.io)\n\n---\n\n## Installation\n\n```sh\npip install fastapi-debug-toolbar\n```\n\n## Quickstart\n\nAdd `DebugToolbarMiddleware` middleware to your FastAPI application:\n\n```py\nfrom debug_toolbar.middleware import DebugToolbarMiddleware\nfrom fastapi import FastAPI\n\napp = FastAPI(debug=True)\napp.add_middleware(DebugToolbarMiddleware)\n```\n\n## SQLAlchemy\n\nPlease make sure to use the *\"Dependency Injection\"* system as described in the [FastAPI docs](https://fastapi.tiangolo.com/tutorial/sql-databases/#create-a-dependency) and add the `SQLAlchemyPanel` to your panel list:\n\n```py\napp.add_middleware(\n DebugToolbarMiddleware,\n panels=[\"debug_toolbar.panels.sqlalchemy.SQLAlchemyPanel\"],\n)\n```\n\n## Tortoise ORM\n\nAdd the `TortoisePanel` to your panel list:\n\n```py\napp.add_middleware(\n DebugToolbarMiddleware,\n panels=[\"debug_toolbar.panels.tortoise.TortoisePanel\"],\n)\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "A debug toolbar for FastAPI.",
"version": "0.6.3",
"project_urls": {
"changelog": "https://fastapi-debug-toolbar.domake.io/changelog/",
"documentation": "https://fastapi-debug-toolbar.domake.io",
"homepage": "https://github.com/mongkok/fastapi-debug-toolbar",
"repository": "https://github.com/mongkok/fastapi-debug-toolbar"
},
"split_keywords": [
"debug",
" fastapi",
" profiling"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a709b01c8c60d608e93faa257a9a3fc9a9739c70c9ac926edfbbe92baebbf33b",
"md5": "cb4a62dda6f8234a5ce3e008242b12ca",
"sha256": "077b5ffeb10426c49387ef090cf307a316d5c71c69bbffe270d9898d2554429e"
},
"downloads": -1,
"filename": "fastapi_debug_toolbar-0.6.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cb4a62dda6f8234a5ce3e008242b12ca",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 42904,
"upload_time": "2024-05-04T17:03:11",
"upload_time_iso_8601": "2024-05-04T17:03:11.585429Z",
"url": "https://files.pythonhosted.org/packages/a7/09/b01c8c60d608e93faa257a9a3fc9a9739c70c9ac926edfbbe92baebbf33b/fastapi_debug_toolbar-0.6.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ace6c228493e929eeb2b9e61806a63e78c3c0bec4e22ddee99f321ffba4fa64a",
"md5": "27488874f6ac03076b2b0cbaf305871d",
"sha256": "15ff6828f9432c786af39f23a2d814ef2af516964b5a9a856444de135a78b2af"
},
"downloads": -1,
"filename": "fastapi_debug_toolbar-0.6.3.tar.gz",
"has_sig": false,
"md5_digest": "27488874f6ac03076b2b0cbaf305871d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 26929,
"upload_time": "2024-05-04T17:03:13",
"upload_time_iso_8601": "2024-05-04T17:03:13.095260Z",
"url": "https://files.pythonhosted.org/packages/ac/e6/c228493e929eeb2b9e61806a63e78c3c0bec4e22ddee99f321ffba4fa64a/fastapi_debug_toolbar-0.6.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-04 17:03:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mongkok",
"github_project": "fastapi-debug-toolbar",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fastapi-debug-toolbar"
}