All Projects → dizballanze → Django Eraserhead

dizballanze / Django Eraserhead

Licence: mit
💂🏻 Django package that provides hints to optimize database usage by deferring unused fields (and more)

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Django Eraserhead

Django Restfulapi
基于 Django 3.x 的 RESTfulAPI 风格的项目模板,用于快速构建企业级高性能的服务端。
Stars: ✭ 184 (-5.15%)
Mutual labels:  django
Dcrm
Darwin Cydia Repo Manager - v4 redesigned in Django.
Stars: ✭ 188 (-3.09%)
Mutual labels:  django
Docker Django Webpack Skeleton
Django Skeleton W/ Docker Dev & Production W/ Webpack 2 W/ BabelJS W/ Sass W/ PostgreSQL
Stars: ✭ 191 (-1.55%)
Mutual labels:  django
Django Enumfield
Custom Django field for using enumerations of named constants
Stars: ✭ 184 (-5.15%)
Mutual labels:  django
Turbo Django
An early stage integration of Hotwire Turbo with Django
Stars: ✭ 185 (-4.64%)
Mutual labels:  django
Flango
A Django template for using Flask for the frontend, Django for the backend.
Stars: ✭ 188 (-3.09%)
Mutual labels:  django
Wq
📱🌐📋 wq: a modular framework supporting web / native geographic data collection apps for mobile surveys and citizen science. Powered by Django REST Framework, Redux, React, and Material UI.
Stars: ✭ 182 (-6.19%)
Mutual labels:  django
Django Environ
Django-environ allows you to utilize 12factor inspired environment variables to configure your Django application.
Stars: ✭ 2,425 (+1150%)
Mutual labels:  django
College Erp
A college management system built using Django framework. It is designed for interactions between students and teachers. Features include attendance, marks and time table.
Stars: ✭ 187 (-3.61%)
Mutual labels:  django
Drf Yasg
Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.
Stars: ✭ 2,523 (+1200.52%)
Mutual labels:  django
Django Markupfield
📑 a MarkupField for Django
Stars: ✭ 184 (-5.15%)
Mutual labels:  django
Python Notifyall
A library which can be used for all types of notifications like SMS, Mail, Push.
Stars: ✭ 185 (-4.64%)
Mutual labels:  django
Django Tutorials
Source code for my free YouTube series on the Django web framework for Python.
Stars: ✭ 188 (-3.09%)
Mutual labels:  django
Django Sharding
A sharding library for Django
Stars: ✭ 184 (-5.15%)
Mutual labels:  django
Djangorestframework Stubs
PEP-484 stubs for django-rest-framework
Stars: ✭ 191 (-1.55%)
Mutual labels:  django
Promansible
PromAnsible, 集成了Prometheuse(基于时间序列数据的服务监控系统)和Ansible(超级简单好用的IT自动化系统),并通过事件报警机制把二者紧密的结合在一起,并配以简单易用的WebUI,真正实现了监控-报警-处理一条龙的全自动化服务。
Stars: ✭ 183 (-5.67%)
Mutual labels:  django
Django Mock Queries
A library for mocking django queryset functions in memory for testing
Stars: ✭ 187 (-3.61%)
Mutual labels:  django
Django Oauth Toolkit
OAuth2 goodies for the Djangonauts!
Stars: ✭ 2,431 (+1153.09%)
Mutual labels:  django
Movieweb python
🎬 Django 搭建的一个视频网站
Stars: ✭ 193 (-0.52%)
Mutual labels:  django
Django Test Migrations
Test django schema and data migrations, including migrations' order and best practices.
Stars: ✭ 188 (-3.09%)
Mutual labels:  django

============================= Django Eraserhead

.. image:: https://badge.fury.io/py/django-eraserhead.svg :target: https://badge.fury.io/py/django-eraserhead

.. image:: https://travis-ci.org/dizballanze/django-eraserhead.svg?branch=master :target: https://travis-ci.org/dizballanze/django-eraserhead

.. image:: https://codecov.io/gh/dizballanze/django-eraserhead/branch/master/graph/badge.svg :target: https://codecov.io/gh/dizballanze/django-eraserhead

.. image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg :target: https://saythanks.io/to/dizballanze

Provide hints to optimize database usage by deferring unused fields

.. image:: https://github.com/dizballanze/django-eraserhead/raw/master/eraserhead.jpg

WARNING use this package only in dev environment!

Documentation

Requirements

  • Django 1.9+
  • Python 2.7, 3.4+

Quickstart

Install Django Eraserhead::

pip install django-eraserhead

Add it to your INSTALLED_APPS:

.. code-block:: python

INSTALLED_APPS = (
    ...
    'eraserhead.apps.EraserheadConfig',
    ...
)

ERASERHEAD_ENABLED = True
ERASERHEAD_TRACEBACK_BASE_PATH = BASE_DIR

Settings:

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

Features

.. image:: https://github.com/dizballanze/django-eraserhead/raw/master/screenshot.png

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.

TODO

  • 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

Credits

Tools used in rendering this package:

  • Cookiecutter_
  • cookiecutter-djangopackage_

.. _Cookiecutter: https://github.com/audreyr/cookiecutter .. _cookiecutter-djangopackage: https://github.com/pydanny/cookiecutter-djangopackage

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].