Django-REST-framework serializer fields for compound types.
Django-REST-framework serializer fields for compound types. Django-REST-framework provides the ability to deal with multiple objects using the many=True option on serializers. That allows for lists of objects and for fields to be lists of objects.
This package expands on that and provides fields allowing:
Lists of simple (non-object) types, described by other serializer fields.
Fields that allow values to be a list or individual item of some type.
Dictionaries of simple and object types.
Partial dictionaries which include keys specified in a list.
A quick example:
Free software: BSD license
IRC: no channel but see AUTHORS for individual nicks on freenode.
Mailing list: None yet, but please log an issue if you want to have discussions about this package.
Deprecate Python 2 support
Upgrade ListOrItemField and PartialDictField for django-rest-framework 3.0 and beyond
Remove ListField and DictField, as they now come with django-rest-framework
Correct validation behaviors when fields are used in embedded serializers. Also correction to the list and dict type checks for None values (#15, #16, #18).
Implement initialize and field_from_native to ensure proper validation in embedded serializers.
Give the fields distinct validate and run_validators implementations that don’t call each other.
Don’t apply the list and dict type checks for None values.
Loosen dependency versions
Remove explicit dependency on Django
Loosen rest-framework to any version before 3
Collect messages of nested errors, instead of error objects (#12)
Add ListOrItemField type (#5, #11)
Fix PartialDictField validation and handling of badly-typed values
Switch project tests to py.test (#10)
First PyPI release of rest-framework serializer compound-fields (#1). Provides:
ListField (#4, #7)
PartialDictField (#8, #9)
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for drf-compound-fields-2.0.0.tar.gz