Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fields for storing serializable data.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 cerial
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.rst
Octocat-spinner-32 setup.py
README.rst

django-cerial

Fields for storing serializable data.

What makes this different from other implementations available?

  • This implementation deserializes only when necessary. Deserializing is done on field access rather than on model instance creation. Serializing is done right before saving the model instance.
  • There is a test suite

Requirements

  • 2.5 <= Python < 3
  • Django

Installation

pip install django-cerial

JSONField

Serializes data as JSON. Example:

from django.db import models
from cerial import JSONField

class Entry(models.Model):
    data = JSONField()

PickleField

Serializes data using cPickle. Example:

from django.db import models
from cerial import PickleField

class Entry(models.Model):
    data = PickleField()
Something went wrong with that request. Please try again.