Dynamic serializers for the Django REST Framework
Project description
Dynamic serializers and view(set)s for the Django REST Framework.
Functionality
DRF Dynamic Serializers is a package that aims to increase the reusability of Django REST Framework’s serializer classes. Serializers that inherit from DynamicFieldsSerializer are dynamic. The fields to include and/or exclude can be overriden as well as the allow_null and required property of fields. A common use case is a list and a detail endpoint sharing the same serializer class but with different fields included.
Furthermore, the package provides a viewset class (DynamicFieldsModelViewSet) that extends Django REST Framework’s ModelViewSet with the the ability to dynamically select the fields to include or exclude in a response by reading the fields and omit query parameters of a request.
Documentation
For more information on installation and configuration see the documentation at:
Issues
If you have questions or have trouble using the app please file a bug report at:
Contributions
It is best to separate proposed changes and PRs into small, distinct patches by type so that they can be merged faster into upstream and released quicker:
features,
bugfixes,
code style improvements, and
documentation improvements.
All contributions are required to pass the quality gates configured with the CI. This includes running tests and linters successfully on the currently officially supported Python and Django versions.
The test automation is run automatically by Travis CI, but you can run it locally with the tox command before pushing commits.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file drf-dynamic-serializers-1.0.tar.gz.
File metadata
- Download URL: drf-dynamic-serializers-1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
006d7a81f035321803d911c84efef4d5a0a776a3522b49885e073ec136884382
|
|
| MD5 |
260b8a3400179cd2773a88e6b7d06b81
|
|
| BLAKE2b-256 |
86bc8d3735f5bca1afd68282aac0f771bd006e6c36ebec6583781664ae3437ec
|
File details
Details for the file drf_dynamic_serializers-1.0-py3-none-any.whl.
File metadata
- Download URL: drf_dynamic_serializers-1.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e863296de6c60d9455aa65917a07b01faaddbca916a87ab3d366434cc10b9916
|
|
| MD5 |
4a7693f30ab6e794d7f421ea296b20d1
|
|
| BLAKE2b-256 |
643a2b6fd39f806cd374c1126696867b15bf63e21b359c759a8c3fabc3ad3801
|