py-debug-inspect-utils

Utils to inspect a stack to quickly debug 'magic' libraries.


License
Unlicense
Install
pip install py-debug-inspect-utils==0.1.0

Documentation

Example Usage

def get_prefetch_queryset(self, instances, queryset=None):
    query = {'%s__in' % self.field.name: instances}

    from py_debug_inspect_utils import debug_print
    debug_print(query=query)

Output:

/Users/Development/venv/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py:625 (get_prefetch_queryset)
()
{'query': {'attribute__in': [<Attribute: Flavor>]}}