Skip to main content

A MsgPack serializer for Django.

Project description

Provides a msgpack serializer/deserializer for Django models instances.

Installation

Add the module msgpack_serializer.serializer to your SERIALIZATION_MODULES setting:

SERIALIZATION_MODULES = {
    "msgpack" : "msgpack_serializer.serializer",
}

Usage

To serialize:

from django.core import serializers

msgpack_serializer = serializers.get_serializer("msgpack")()
data = msgpack_serializer.serialize(my_objects)

To deserialize:

from django.core import serializers

deserialized_objects = serializers.deserialize('msgpack', data)
objs = [deserialized.object for deserialized in deserialized_objects]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django msgpack serializer-0.0.1.tar.gz (2.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page