Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dz0ny/pyramid_straw
Makes debugging SQLAlchemy in Pyramid a joy.
https://github.com/dz0ny/pyramid_straw
debug pyramid-framework sqlachemy
Last synced: about 1 month ago
JSON representation
Makes debugging SQLAlchemy in Pyramid a joy.
- Host: GitHub
- URL: https://github.com/dz0ny/pyramid_straw
- Owner: dz0ny
- Created: 2016-12-06T11:21:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-18T11:44:35.000Z (about 7 years ago)
- Last Synced: 2024-11-17T06:42:29.137Z (about 2 months ago)
- Topics: debug, pyramid-framework, sqlachemy
- Language: JavaScript
- Homepage:
- Size: 1.95 MB
- Stars: 3
- Watchers: 5
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pyramid Straw
[![Build Status](https://travis-ci.org/dz0ny/pyramid_straw.svg?branch=master)](https://travis-ci.org/dz0ny/pyramid_straw)
The first tool you should use to analyze whats going on with
your database, when developing pyramid apps.---
![screenshots/cover.png](screenshots/cover.png)
![screenshots/new_functionalily_on_sql_explained_modal.jpg](screenshots/new_functionalily_on_sql_explained_modal.jpg)
![screenshots/pev_modal.png](screenshots/pev_modal.png)## Installing
Include project after debug_toolbar.
```
pyramid.includes =
pyramid_straw.profiler
pyramid_straw.panel
```# Configuration
Project consists of two parts
## Config options
```
pyramid_straw.only_paths
pyramid_straw.report_hook
pyramid_straw.disable_inspect
```### pyramid_straw.only_paths
If you want to limit what is backtraced for each query
(defaults to package where it is included). You can override
``pyramid_straw.only_paths``.For example:
```
pyramid_straw.only_paths = ['/home/dz0ny/ebn/src/']
```### pyramid_straw.report_hook
And if you want to send reports somewhere else you can use
report hook that needs to be callable and accepts data dict for
each query. This would be little expensive in production so beware.For example:
```
def report_hook(data):
requests.post(config.my_report_url, json=data)config.add_settings({
'pyramid_straw.report_hook': report_hook
})
```### pyramid_straw.disable_inspect
You can also disable query inspection with setting ```disable_inspect```
to false. For example:```
config.add_settings({
'pyramid_straw.disable_inspect': False
}) ```