djangorestframework-msgpack

MessagePack support for Django REST framework


Keywords
django, django-rest-framework, messagepack
License
BSD-3-Clause
Install
pip install djangorestframework-msgpack==1.0.2

Documentation

Django Rest Framework Msgpack

https://api.travis-ci.org/juanriaza/django-rest-framework-msgpack.png?branch=master
Version: 1.0.1
Author: Juan Riaza

Overview

MessagePack is a fast, compact binary serialization format, suitable for similar data to JSON. This package provides MessagePack support for Django REST framework.

How to install

Install using pip:

$ pip install djangorestframework-msgpack

...or clone the project from github:

$ git clone git@github.com:juanriaza/django-rest-framework-msgpack.git
$ cd django-rest-framework-msgpack
$ pip install -r requirements.txt

How use it?

This package provides a renderer MessagePackRenderer and a parser MessagePackParser.

Setting the renderer and the parser

Just follow the documentation:

rest_framework_msgpack.renderers.MessagePackRenderer

Renders the request data into MessagePack.

.media_type: application/msgpack
.format: .msgpack

rest_framework_msgpack.parsers.MessagePackParser

Parses MessagePack request content.

.media_type: application/msgpack

Running the tests

To run the tests against the current environment:

./manage.py test

Changelog

1.0.1

15th Jan 2012

  • The parser now support streams (by SĂ©bastien BĂ©al)

1.0.0

6th Jan 2012

  • Initial release