No project description provided
Project description
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
- Python 3.4+
- Django 1.8+ (tested with 1.8-3.0)
- msgpack-python
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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-msgpackfield-0.15.tar.gz.
File metadata
- Download URL: django-msgpackfield-0.15.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91071ae5bc747153fb0a64ace8de9c24ac90d6a63e389f0fe748d5e11b3a6015
|
|
| MD5 |
f6382f5c473d297de20bdbecb0dd8b4a
|
|
| BLAKE2b-256 |
ea936168a15bcc4aa656c5f897b8d8cc317a457d75e3439b438ff69e91e5586b
|