A pretty-printer for debugging django-readers queryset functions
Project description
django-readers-debug
STATUS: EXPERIMENTAL
A pretty-printer for debugging django-readers queryset functions.
Installation
Install from PyPI
pip install django-readers-debug
Usage
Without django-readers-debug
:
>>> from django_readers import qs
>>> prepare = qs.pipe(
... qs.include_fields("name"),
... qs.auto_prefetch_relationship("author", qs.include_fields("name")),
... qs.filter(publication_year__gte=2021),
... )
>>> print(prepare)
<function pipe.<locals>.piped at 0x10ce2a670>
>>>
With django-readers-debug
:
>>> from django_readers_debug import debug_print
>>> debug_print(prepare)
qs.pipe(
qs.include_fields("name"),
qs.auto_prefetch_relationship(
"author", prepare_related_queryset=qs.include_fields("name")
),
qs.filter(publication_year__gte=2021),
)
Known limitations
Best-effort printing of Q
objects and Prefetch
objects only.
Code of conduct
For guidelines regarding the code of conduct when contributing to this repository please review https://www.dabapps.com/open-source/code-of-conduct/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-readers-debug-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b82c476f9c881304094b91018bc2450744f10583267c854882664c8180a3710 |
|
MD5 | be5da74b351e674b56ed42bfc56a348b |
|
BLAKE2b-256 | 147d8dd89a72601b6688876c7b6616bc07355b56898c4579ea402852442a2ffd |
Close
Hashes for django_readers_debug-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 592e9df14972b460407c350e307dbbb376f9ae84a528b69601100e8308f75526 |
|
MD5 | 278cc39227be45b7381423bae135ccca |
|
BLAKE2b-256 | b920221e13a0a5b51365a2a53e77c16a68ffa08fd7d452b4a7d208ee91c2fd44 |