Skip to main content

Django Debug Toolbar Alchemy

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.1 (2018-07-13)

  • Fix bug which did not correctly track plain string clauses.

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.

Metadata

Release files for django-debug-toolbar-alchemy 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-debug-toolbar-alchemy 0.1.1
File Size Uploaded Provenance Actions
django-debug-toolbar-alchemy-0.1.1.tar.gz 5.7 kB Without provenance Details for django-debug-toolbar-alchemy-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-debug-toolbar-alchemy 0.1.1
File Interpreter ABI Platform Actions
django_debug_toolbar_alchemy-0.1.1-py2.py3-none-any.whl Python 3, Python 2 none any Details for django_debug_toolbar_alchemy-0.1.1-py2.py3-none-any.whl

Total release size: 12.4 kB

Release files / django-debug-toolbar-alchemy-0.1.1.tar.gz

Download URL django-debug-toolbar-alchemy-0.1.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a0c5b4e663d9e466bb7c6f883e1ee781686d5ddf46fe1e95b7938abe940a0465
BLAKE2b-256 checksum
How to use checksums
b10d3d4cbf7b1bb88f6fd32cf18dc19c05b0b220c1c1e5f6b543a153f48677f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_debug_toolbar_alchemy-0.1.1-py2.py3-none-any.whl

Download URL django_debug_toolbar_alchemy-0.1.1-py2.py3-none-any.whl
Size 6.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0693728f29a0bd0e7722d2c89b2cdf5976828b14ba6b40f9a80e56450debf49b
BLAKE2b-256 checksum
How to use checksums
70319243f34211b51bfb098c323e0211cc8af7b1d7f31f1b471046ad4752baca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-debug-toolbar-alchemy 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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