django-serializers

Software Screenshot:
django-serializers
Software Details:
Version: 0.5.1
Upload Date: 20 Feb 15
Developer: Tom Christie
Distribution Type: Freeware
Downloads: 3

Rating: nan/5 (Total Votes: 0)

django-serializers is a Django app that provides flexible serialization of objects, models and querysets.

It is intended to be a potential replacement for the current, inflexible serialization. It should be able to support the current dumpdata format, whilst also being easy to override and customise.

Serializers are declared in a simlar format to Form and Model declarations, with an inner Meta class providing general options, and optionally with a set of Field classes being declaring inside the Serializer class.

The Serializer class itself also implements the Field interface, meaning we can represent serialization of nested instances in various different ways.

Installation

Install using pip:

pip install django-serializers

Optionally, if you want to include the django-serializer tests in your project, add serializers to your INSTALLED_APPS setting:

INSTALLED_APPS = (
 ...
 'seriliazers',
)


Note that if you have cloned the git repo you can run the tests directly, with the provided manage.py file:

manage.py test

Features:

  • Supports serialization of arbitrary python objects using the Serializer class.
  • Supports serialization of models and querysets using ModelSerializer.
  • Supports serialization to the existing dumpdata format, using DumpDataSerializer.
  • Supports flat serialization, and nested serialization (to arbitrary depth), and handles recursive relationships.
  • Allows for both implicit fields, which are determined at the point of serialization, and explicit fields, which are declared on the serializer class.
  • The declaration of the serialization structure is handled independantly of the final encoding used (eg 'json', 'xml' etc...). This is desirable for eg. APIs which want to support a given dataset being output to a number of different formats.
  • Currently supports 'json', 'yaml', 'xml'.
  • Supports both ordered fields for readablity, and unordered fields for speed.
  • Supports both fields that corrospond to Django model fields, and fields that corrospond to other attributes, such as get_absolute_url.
  • Hooks throughout to allow for complete customization. Eg. Writing key names using javascript style camel casing.
  • Simple, clean API.
  • Comprehensive test suite.

Requirements:

  • Python
  • Django

Other Software of Developer Tom Christie

django-pdb
django-pdb

20 Feb 15

MkDocs
MkDocs

20 Jul 15

Comments to django-serializers

Comments not found
Add Comment
Turn on images!