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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1955577cc5583d2e0d5d14c10b3fb19c3245918d7aadfed4b4ba1d95f902a7d7 |
|
MD5 | bbce91f81ff5270be0464e4e849f8668 |
|
BLAKE2b-256 | 7ab5e862b7dcb7e9554ace29367a20905390b78318591af893f68ea588f2c334 |
Close
Hashes for django_readers_debug-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a877aaa235b23d0a0fef2125a4899328f2f893d216df39ca9aaf37278ea1af6 |
|
MD5 | 3e9fda513b5320bd5ccf32a597739a32 |
|
BLAKE2b-256 | 208b004d09b206c80e622ed091f09f20fadfc764e9ffa4ceffa9475f6fe40e9f |