Skip to main content
https://badge.fury.io/py/django-debug-toolbar-alchemy.svg

Django Debug Toolbar panel for SQLAlchemy.

Overview

This package completely mimics default Django Debug Toolbar SQL panel (internally its actually subclassed) but instead of displaying queries done via Django ORM, SQLAlchemy generated queries are displayed. Rest of the functionality is the same.

Installing

First install:

$ pip install django-debug-toolbar-alchemy

Then in your settings:

# settings.py
DEBUG_TOOLBAR_PANELS = [
    # other panels
    'debug_toolbar_alchemy.panels.sql.SQLPanel',
    # other panels
]

In order to support multiple DB databases, alias getter callable must be specified in settings:

# settings.py
DEBUG_TOOLBAR_CONFIG = {
    'ALCHEMY_DB_ALIASES': '<dot patht to alias getter>',
}

Alias getter must return a dictionary of aliases as keys and SQLAlchemy engines as values. If your application uses global session, you can get the engine from session instances:

from myapp.db import session, session_slave

def alchemy_dbs():
    return {
        'default': session.bind,
        'slave': session_slave.bind,
    }

History

0.1.0 (2017-10-04)

  • First release on PyPI.

Credits

Development Lead

Contributors

  • None yet. Why not be the first?

License

The MIT License (MIT)

Copyright (c) 2017, Miroslav Shubernetskiy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-debug-toolbar-alchemy-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_debug_toolbar_alchemy-0.1.0-py2.py3-none-any.whl (9.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-debug-toolbar-alchemy-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-debug-toolbar-alchemy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 33dcb3534e6742ab371557e71363fa66a0418d5f7e233fa7c08d14c20cfde71c
MD5 07feb06c4a5e59904376576c5e24c26f
BLAKE2b-256 1b3076e1fda664f9d3c91b5373a44d6b8bba82aa805aafa5dea58f7943b20fb6

See more details on using hashes here.

File details

Details for the file django_debug_toolbar_alchemy-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_debug_toolbar_alchemy-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a49d3359ea84747a1107dabdd9d0ddbde2e0a9c3100c6684f8f327acb18026af
MD5 8869245f18d5fa42ff0877a87412dab0
BLAKE2b-256 81e8a937f7704b4259568b5ae5e4a653511662d5ce698cf4953d7d6b783d09d5

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page