Skip to main content

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

django-readers-debug-0.0.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

django_readers_debug-0.0.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file django-readers-debug-0.0.1.tar.gz.

File metadata

  • Download URL: django-readers-debug-0.0.1.tar.gz
  • Upload date:
  • Size: 3.4 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

Hashes for django-readers-debug-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1955577cc5583d2e0d5d14c10b3fb19c3245918d7aadfed4b4ba1d95f902a7d7
MD5 bbce91f81ff5270be0464e4e849f8668
BLAKE2b-256 7ab5e862b7dcb7e9554ace29367a20905390b78318591af893f68ea588f2c334

See more details on using hashes here.

File details

Details for the file django_readers_debug-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: django_readers_debug-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 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

Hashes for django_readers_debug-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3a877aaa235b23d0a0fef2125a4899328f2f893d216df39ca9aaf37278ea1af6
MD5 3e9fda513b5320bd5ccf32a597739a32
BLAKE2b-256 208b004d09b206c80e622ed091f09f20fadfc764e9ffa4ceffa9475f6fe40e9f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page