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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6108d2bded6fbf0bfa5f9c6408fa7231bff285c4bcf8b456216271d71615d93 |
|
MD5 | bed07d1160323a5918957a794884dfc3 |
|
BLAKE2b-256 | 8e2151959e88333f5549e17fc2f73014e0bc9ac28c427f4a256f36e73f133def |
Close
Hashes for django_readers_debug-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23d99fa62bb8956ef6d7bc8ce8ebfe1aa72afe18bd9be5a1f8b83758c3c526b1 |
|
MD5 | a8965dced0be5094bc8deeb061eac612 |
|
BLAKE2b-256 | 712d82b0e1fd57d9fd90574aa69ea3557364d4eaaba38ab5a039b159bbc62755 |