Skip to main content

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/

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_readers_debug-0.0.4-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django-readers-debug-0.0.4.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 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.4.tar.gz
Algorithm Hash digest
SHA256 e6108d2bded6fbf0bfa5f9c6408fa7231bff285c4bcf8b456216271d71615d93
MD5 bed07d1160323a5918957a794884dfc3
BLAKE2b-256 8e2151959e88333f5549e17fc2f73014e0bc9ac28c427f4a256f36e73f133def

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_readers_debug-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 23d99fa62bb8956ef6d7bc8ce8ebfe1aa72afe18bd9be5a1f8b83758c3c526b1
MD5 a8965dced0be5094bc8deeb061eac612
BLAKE2b-256 712d82b0e1fd57d9fd90574aa69ea3557364d4eaaba38ab5a039b159bbc62755

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page