https://github.com/juanriaza/django-rest-framework-msgpack
MessagePack support for Django REST framework
https://github.com/juanriaza/django-rest-framework-msgpack
django django-rest-framework messagepack
Last synced: 18 days ago
JSON representation
MessagePack support for Django REST framework
- Host: GitHub
- URL: https://github.com/juanriaza/django-rest-framework-msgpack
- Owner: juanriaza
- License: other
- Created: 2013-01-06T14:08:36.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2019-05-26T13:03:00.000Z (almost 7 years ago)
- Last Synced: 2026-02-12T02:13:23.754Z (2 months ago)
- Topics: django, django-rest-framework, messagepack
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 91
- Watchers: 0
- Forks: 21
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Django Rest Framework Msgpack
=============================
.. image:: https://api.travis-ci.org/juanriaza/django-rest-framework-msgpack.png?branch=master
:target: https://travis-ci.org/juanriaza/django-rest-framework-msgpack
:Version: 1.0.2
: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``:
.. code-block:: bash
$ pip install djangorestframework-msgpack
...or clone the project from github:
.. code-block:: bash
$ 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:
- `Setting the renderer `_.
- `Setting the parser `_.
``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.2
-----
**22th Apr 2017**
* Match current DRF api (by V.Korol - @vakorol)
* `python-dateutil` unpinned version (by Justin Whitehead - @whitej125)
* Python 3 compatibility (by Roberto Barreda @robertobarreda and @cecedille1)
1.0.1
-----
**15th Jan 2012**
* The parser now support streams (by Sébastien Béal - @sebastibe)
1.0.0
-----
**6th Jan 2012**
* Initial release