Skip to content

A simple implementation of a Django binary field that does automatic serialization/deserialization into/from MsgPack format.

License

Notifications You must be signed in to change notification settings

vakorol/django-msgpackfield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-msgpackfield

Provides a binary django model field with automatic serialization/deserialization of native Python structures into/from MsgPack format.

It also comes with a form widget, basically a <TEXTAREA> where data can be input in JSON. This data is then converted to MsgPack when the form is submitted.

Requirements

Installation

Install it with pip (or easy_install) :

pip3 install django-msgpackfield

Usage

Typical usage in a Django model:

from django.db import models
from msgpackfield import MsgPackField

class MyModel ( models.Model ) :
    data = MsgPackField( null=True, blank=True )

obj = MyModel()
obj.data = { 'foo': 1, 'bar': 2, 'baz': [ 1, 2, 3, 4, 5 ] }
obj.save()

About

A simple implementation of a Django binary field that does automatic serialization/deserialization into/from MsgPack format.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages