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
File details
Details for the file django-readers-debug-0.0.3.tar.gz
.
File metadata
- Download URL: django-readers-debug-0.0.3.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d5f4218898dbf6a1372cd58e2f92e280bed855ed0a40b067e8d76c2d05282ab |
|
MD5 | c38515774da8dc12625b2df61995a038 |
|
BLAKE2b-256 | f471ca8ca060f4200af27ab94355897504ce50ee5605d16d016e0e76db76419c |
File details
Details for the file django_readers_debug-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: django_readers_debug-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3506d24458bb9cfd730f31c545a66d5db2f5ba7de3432f6b94e06857598fe769 |
|
MD5 | de9f48191e501851c5637eef1436c480 |
|
BLAKE2b-256 | d5f4172d7dbb260eea022b7b5b50653ba33f00a970a7b06e378c1b53c3b5c553 |