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.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: django-readers-debug-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 4b82c476f9c881304094b91018bc2450744f10583267c854882664c8180a3710
MD5 be5da74b351e674b56ed42bfc56a348b
BLAKE2b-256 147d8dd89a72601b6688876c7b6616bc07355b56898c4579ea402852442a2ffd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_readers_debug-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 592e9df14972b460407c350e307dbbb376f9ae84a528b69601100e8308f75526
MD5 278cc39227be45b7381423bae135ccca
BLAKE2b-256 b920221e13a0a5b51365a2a53e77c16a68ffa08fd7d452b4a7d208ee91c2fd44

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