Skip to main content

Provide hints to optimize database usage by deferring unused fields

Project description

Django Eraserhead

.. image::

.. image::

.. image::

Provide hints to optimize database usage by deferring unused fields

.. image::

*WARNING* use this package only in dev environment!



* Django 1.9+
* Python 2.7, 3.4+


Install Django Eraserhead::

pip install django-eraserhead

Add it to your `INSTALLED_APPS`:

.. code-block:: python




* `ERASERHEAD_ENABLED` - enable/disable Django Eraserhead
* `ERASERHEAD_TRACEBACK_BASE_PATH` - set base path to filter tracebacks. Set to `None` to display full traceback.


.. image::

Django Eraserhead monitors:

* querysets/models fields usage (used and unused fields) with considering deferred fields
* count of instances created for each queryset
* corresponding model of each queryset
* traceback for each queryset to easily find corresponding code
* calculate memory consumption of unused fields

Based on fields usage Django Eraserhead suggests optimizations for each queryset.


* decorator and/or context processor for partial stats collecting
* detect deferred fields loading
* auto deferring fields based on usage
* display deferred fields

Running Tests


source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox


Tools used in rendering this package:

* Cookiecutter_
* `cookiecutter-djangopackage`_

.. _Cookiecutter:
.. _`cookiecutter-djangopackage`:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-eraserhead, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size django_eraserhead-0.1.5-py2.py3-none-any.whl (7.9 kB) File type Wheel Python version 3.5 Upload date Hashes View
Filename, size django-eraserhead-0.1.5.tar.gz (6.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page