Efficient pickling for django models
Python
Switch branches/tags
Nothing to show
Latest commit 8ff0273 May 24, 2017 @Suor Up to 1.0
Permalink
Failed to load latest commit information.
tests Add settings file to run Django test suite with django-pickling in ef… May 22, 2017
.gitignore
.travis.yml Set up travis May 19, 2017
CHANGELOG Up to 1.0 May 24, 2017
LICENSE Update LICENSE May 19, 2017
MANIFEST.in Up to 0.2 Apr 7, 2016
README.rst Note that objects with deferred fields are not optimized May 24, 2017
bench.ini Set up benchmarks May 21, 2017
django_pickling.py Up to 1.0 May 24, 2017
pytest.ini Add tests May 19, 2017
setup.py Up to 1.0 May 24, 2017
test_requirements.txt Drop django version check May 19, 2017
tox.ini Drop django version check May 19, 2017

README.rst

Django pickling

Makes django models pickling 2-3 times faster and compact.

Requirements

Python 2.7 or 3.3+, Django 1.8+

Installation and setup

$ pip install django-pickling

Then add django_pickling to your INSTALLED_APPS.

CAVEATS

  1. No Django version checks are performed.
  2. If fields list changes you will see TypeErrors instead of AttributeErrors.

In both cases you should wipe your cache or change keys. Note that you will need to deal with this anyway, with django-pickling you'll just get weirder errors.

Another thing is that objects with deferred fields are not optimized.