mirror of
https://github.com/vinta/awesome-python.git
synced 2026-11-08 02:15:12 -06:00
docs: add Silk to Debugging Tools intro
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ How to choose:
|
||||
- A readable call tree of where your script spends wall-clock time: pyinstrument
|
||||
- CPU, GPU, and memory use, line by line: Scalene
|
||||
- SQL queries and request data on Django pages: Django Debug Toolbar
|
||||
- Every Django request and its SQL queries, recorded to inspect later: Silk
|
||||
- Print debugging that labels each value: IceCream
|
||||
- The same toolbar on Flask pages: Flask-DebugToolbar
|
||||
|
||||
@@ -29,6 +30,8 @@ Scalene profiles CPU, GPU, and memory [line by line and per function](https://gi
|
||||
|
||||
Django Debug Toolbar adds [panels](https://django-debug-toolbar.readthedocs.io/en/latest/panels.html) to your pages for the current request's SQL queries, templates, cache calls, and more. [Its setup](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html) adds the app, its URLs, and its middleware, and shows the toolbar only to IP addresses in `INTERNAL_IPS`.
|
||||
|
||||
Silk [intercepts and stores HTTP requests and database queries](https://github.com/jazzband/django-silk), then shows them in its own UI: each request's time, query count, headers, and bodies. [Its setup](https://github.com/jazzband/django-silk#installation) adds its middleware and app to your settings, includes `silk.urls` in your URLconf, and runs `migrate`. The UI then lives at `/silk/`.
|
||||
|
||||
IceCream's `ic()` [prints each expression along with its value](https://github.com/gruns/icecream). With no arguments, it prints [the file, line, and function it runs in](https://github.com/gruns/icecream#inspect-execution). Since `ic()` [returns its arguments](https://github.com/gruns/icecream#return-value), you can wrap an expression in existing code without rewriting the line.
|
||||
|
||||
Flask-DebugToolbar is [a port of Django Debug Toolbar](https://github.com/pallets-eco/flask-debugtoolbar) to Flask. Wrap your app in `DebugToolbarExtension(app)`, and the toolbar [shows up in HTML responses while debug mode is on](https://flask-debugtoolbar.readthedocs.io/en/latest/).
|
||||
|
||||
Reference in New Issue
Block a user