Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mongkok/fastapi-debug-toolbar
A debug toolbar for FastAPI.
https://github.com/mongkok/fastapi-debug-toolbar
ariadne debug fastapi graphene graphql profiling pyinstrument sqlalchemy swagger tortoise-orm
Last synced: about 9 hours ago
JSON representation
A debug toolbar for FastAPI.
- Host: GitHub
- URL: https://github.com/mongkok/fastapi-debug-toolbar
- Owner: mongkok
- License: bsd-3-clause
- Created: 2021-07-21T19:11:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-18T02:53:48.000Z (about 1 month ago)
- Last Synced: 2024-12-22T01:07:01.430Z (7 days ago)
- Topics: ariadne, debug, fastapi, graphene, graphql, profiling, pyinstrument, sqlalchemy, swagger, tortoise-orm
- Language: Python
- Homepage: https://fastapi-debug-toolbar.domake.io
- Size: 7.08 MB
- Stars: 141
- Watchers: 4
- Forks: 14
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ![FastAPI](https://raw.githubusercontent.com/mongkok/fastapi-debug-toolbar/main/debug_toolbar/statics/img/icon-green.svg) Debug Toolbar
🐞A debug toolbar for FastAPI based on the original django-debug-toolbar.🐞
Swagger UI & GraphQL are supported.
---
**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 FastAPIapp = 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"],
)
```