Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chibisov/drf-extensions
DRF-extensions is a collection of custom extensions for Django REST Framework
https://github.com/chibisov/drf-extensions
Last synced: 4 days ago
JSON representation
DRF-extensions is a collection of custom extensions for Django REST Framework
- Host: GitHub
- URL: https://github.com/chibisov/drf-extensions
- Owner: chibisov
- License: mit
- Created: 2013-07-25T07:06:04.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-09-11T12:30:44.000Z (4 months ago)
- Last Synced: 2024-10-29T15:05:57.847Z (2 months ago)
- Language: Python
- Homepage: http://chibisov.github.io/drf-extensions/docs
- Size: 1.32 MB
- Stars: 1,468
- Watchers: 33
- Forks: 208
- Open Issues: 75
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
- Authors: AUTHORS.md
Awesome Lists containing this project
- awesome-django-rest-framework - drf-extensions - extensions is a collection of custom extensions for Django REST Framework (Packages / Other)
- awesome-django-rest-framework - drf-extensions - extensions is a collection of custom extensions for Django REST Framework (Packages / Other)
- starred-awesome - drf-extensions - DRF-extensions is a collection of custom extensions for Django REST Framework (Python)
README
## Django REST Framework extensions
DRF-extensions is a collection of custom extensions for [Django REST Framework](https://github.com/tomchristie/django-rest-framework)
Full documentation for project is available at [http://chibisov.github.io/drf-extensions/docs](http://chibisov.github.io/drf-extensions/docs)
[![Build Status](https://travis-ci.org/chibisov/drf-extensions.svg?branch=master)](https://travis-ci.org/chibisov/drf-extensions)
[![Backers on Open Collective](https://opencollective.com/drf-extensions/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/drf-extensions/sponsors/badge.svg)](#sponsors) [![PyPI](https://img.shields.io/pypi/v/drf-extensions.svg)](https://pypi.python.org/pypi/drf-extensions)### Sponsor
[Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools.](https://tidelift.com/subscription/pkg/pypi-drf-extensions?utm_source=pypi-drf-extensions&utm_medium=referral&utm_campaign=readme)
## Requirements
* Tested for Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12
* Tested for Django Rest Framework 3.12, 3.13, 3.14 and 3.15
* Tested for Django 2.2 to 3.2 & for Django 4.2 , 5.1
* Tested for django-filter 2.1.0## Installation:
pip3 install drf-extensions
or from github
pip3 install https://github.com/chibisov/drf-extensions/archive/master.zip## Some features
* DetailSerializerMixin
* Caching
* Conditional requests
* Customizable key construction for caching and conditional requests
* Nested routes
* Bulk operationsRead more in [documentation](http://chibisov.github.io/drf-extensions/docs)
## Development
Running the tests:
$ pip3 install tox
$ tox -- tests_appRunning test for exact environment:
$ tox -e py38 -- tests_app
Recreate envs before running tests:
$ tox --recreate -- tests_app
Pass custom arguments:
$ tox -- tests_app --verbosity=3
Run with pdb support:
$ tox -- tests_app --processes=0 --nocapture
Run exact TestCase:
$ tox -- tests_app.tests.unit.mixins.tests:DetailSerializerMixinTest_serializer_detail_class
Run tests from exact module:
$ tox -- tests_app.tests.unit.mixins.tests
Build docs:
$ make build_docs
Automatically build docs by watching changes:
$ pip install watchdog
$ make watch_docs## Developing new features
Every new feature should be:
* Documented
* Tested
* Implemented
* Pushed to main repository### How to write documentation
When new feature implementation starts you should place it into `development version` pull. Add `Development version`
section to `Release notes` and describe every new feature in it. Use `#anchors` to facilitate navigation.Every feature should have title and information that it was implemented in current development version.
For example if we've just implemented `Usage of the specific cache`:
...
#### Usage of the specific cache
*New in DRF-extensions development version*
`@cache_response` can also take...
...
### Release notes
...
#### Development version
* Added ability to [use a specific cache](#usage-of-the-specific-cache) for `@cache_response` decorator
## Publishing new releases
Increment version in `rest_framework_extensions/__init__.py`. For example:
__version__ = '0.2.2' # from 0.2.1
Move to new version section all release notes in documentation.
Add date for release note section.
Replace in documentation all `New in DRF-extensions development version` notes to `New in DRF-extensions 0.2.2`.
Rebuild documentation.
Run tests.
Commit changes with message "Version 0.2.2"
Add new tag version for commit:
$ git tag 0.2.2
Push to master with tags:
$ git push origin master --tags
Don't forget to merge `master` to `gh-pages` branch and push to origin:
$ git co gh-pages
$ git merge --no-ff master
$ git push origin gh-pagesPublish to pypi:
$ python setup.py publish
## Contributors
This project exists thanks to all the people who contribute.
## Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/drf-extensions#backer)]
## Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/drf-extensions#sponsor)]