skillfed

django-pickling

Efficient pickling for django models.

django-pickling v1.0 111.3K downloads/30d#12,424 on PyPI77
Permissive license BSD Abandoned released

What it is and what it does

django-pickling is a Django app that optimizes the serialization of model instances into pickle format, claiming 2-3× speedup and more compact output. It works by intercepting Django's default pickling behavior and applying custom serialization logic tailored to model structure.

The package is intended for projects that rely heavily on caching or session storage of Django model instances. It requires adding it to INSTALLED_APPS and works with Django 1.8+ and Python 2.7 or 3.3+. The caveats are significant: no Django version checks occur at runtime, field schema changes produce confusing TypeErrors instead of AttributeErrors, and deferred fields are not optimized. The maintainer advises wiping cache or changing keys when field lists change.

Use it for:

  • Reduce memory footprint of cached Django model instances in Redis or Memcached
  • Speed up session serialization when storing model objects in Django sessions
  • Optimize pickle-based inter-process communication of model data in Celery tasks
  • Improve performance of applications that frequently pickle/unpickle model instances

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Speeds up Django model pickling by 2-3 times and reduces serialized size by optimizing how model instances are converted to bytes.

No. The package is abandoned (last commit 2017-05-24) and targets Django 1.8–1.11 and Python 2.7–3.6, all of which are long out of support. Modern Django and Python versions are unsupported and untested. Unless you are maintaining legacy code on those exact versions, the risk of silent failures and incompatibility outweighs any performance gain.

Install

django-pickling on PyPI

pip

pip install django-pickling

uv

uv add django-pickling

poetry

poetry add django-pickling

Installing django-pickling

Before you install

High install friction due to age and abandonment. Last release was 2017-05-25 and last commit 2017-05-24; no maintenance activity in years. Compatibility claims extend only to Django 1.8–1.11 and Python 2.7 or 3.3–3.6, well outside current support windows.

License in practice

BSD license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.

Quickstart

pip install django-pickling

Then add django_pickling to INSTALLED_APPS in your Django settings.

Requires Django 1.8+ and Python 2.7 or 3.3+; no Django version checks are performed at runtime.

Verify before relying

  • Whether the package works with modern Django versions (2.0+) and current Python releases (3.7+)
  • Whether cached pickles from older versions remain compatible after Django/Python upgrades
  • Real-world performance gains on current hardware and Django versions

Package facts

License BSD (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 3,368 days since the last release
Last repo commit
First released
Downloads 111,272/month — #12,424 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django-pickling-1.0.tar.gz

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 1.10Framework :: Django :: 1.11Framework :: Django :: 1.8Framework :: Django :: 1.9Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Software Development :: Libraries :: Python Modules

Tags

django model picklingfaster django serializationdjango pickle optimizationefficient model cachingdjango cache performance
djangocachingserialization

More Python Modules packages