Debian Codegraph @

docs/community/third-party-packages.md

raw
1 # Third Party Packages
2
3 > Software ecosystems […] establish a community that further accelerates the sharing of knowledge, content, issues, expertise and skills.
4 >
5 > — [Jan Bosch][cite].
6
7 ## About Third Party Packages
8
9 Third Party Packages allow developers to share code that extends the functionality of Django REST framework, in order to support additional use-cases.
10
11 We **support**, **encourage** and **strongly favor** the creation of Third Party Packages to encapsulate new behavior rather than adding additional functionality directly to Django REST Framework.
12
13 We aim to make creating third party packages as easy as possible, whilst keeping a **simple** and **well maintained** core API. By promoting third party packages we ensure that the responsibility for a package remains with its author. If a package proves suitably popular it can always be considered for inclusion into the core REST framework.
14
15 If you have an idea for a new feature please consider how it may be packaged as a Third Party Package. We're always happy to discuss ideas on the [Mailing List][discussion-group].
16
17 ## Creating a Third Party Package
18
19 ### Version compatibility
20
21 Sometimes, in order to ensure your code works on various different versions of Django, Python or third party libraries, you'll need to run slightly different code depending on the environment. Any code that branches in this way should be isolated into a `compat.py` module, and should provide a single common interface that the rest of the codebase can use.
22
23 Check out Django REST framework's [compat.py][drf-compat] for an example.
24
25 ### Once your package is available
26
27 Once your package is decently documented and available on PyPI, you might want share it with others that might find it useful.
28
29 #### Adding to the Django REST framework grid
30
31 We suggest adding your package to the [REST Framework][rest-framework-grid] grid on Django Packages.
32
33 #### Adding to the Django REST framework docs
34
35 Create a [Pull Request][drf-create-pr] on GitHub, and we'll add a link to it from the main REST framework documentation. You can add your package under **Third party packages** of the API Guide section that best applies, like [Authentication][authentication] or [Permissions][permissions]. You can also link your package under the [Third Party Packages][third-party-packages] section.
36
37 #### Announce on the discussion group.
38
39 You can also let others know about your package through the [discussion group][discussion-group].
40
41 ## Existing Third Party Packages
42
43 Django REST Framework has a growing community of developers, packages, and resources.
44
45 Check out a grid detailing all the packages and ecosystem around Django REST Framework at [Django Packages][rest-framework-grid].
46
47 To submit new content, [create a pull request][drf-create-pr].
48
49 ### Async Support
50
51 * [adrf](https://github.com/em1208/adrf) - Async support, provides async Views, ViewSets, and Serializers.
52
53 ### Authentication
54
55 * [djangorestframework-digestauth][djangorestframework-digestauth] - Provides Digest Access Authentication support.
56 * [django-oauth-toolkit][django-oauth-toolkit] - Provides OAuth 2.0 support.
57 * [djangorestframework-simplejwt][djangorestframework-simplejwt] - Provides JSON Web Token Authentication support.
58 * [hawkrest][hawkrest] - Provides Hawk HTTP Authorization.
59 * [djangorestframework-httpsignature][djangorestframework-httpsignature] - Provides an easy to use HTTP Signature Authentication mechanism.
60 * [djoser][djoser] - Provides a set of views to handle basic actions such as registration, login, logout, password reset and account activation.
61 * [DRF Auth Kit][drf-auth-kit] - Provides complete REST authentication with JWT cookies, social login, MFA, and user management. Features full type safety and automatic OpenAPI schema generation.
62 * [dj-rest-auth][dj-rest-auth] - Provides a set of REST API endpoints for registration, authentication (including social media authentication), password reset, retrieve and update user details, etc.
63 * [drf-oidc-auth][drf-oidc-auth] - Implements OpenID Connect token authentication for DRF.
64 * [drfpasswordless][drfpasswordless] - Adds (Medium, Square Cash inspired) passwordless logins and signups via email and mobile numbers.
65 * [django-rest-authemail][django-rest-authemail] - Provides a RESTful API for user signup and authentication using email addresses.
66 * [dango-pyoidc][django-pyoidc] adds support for OpenID Connect (OIDC) authentication.
67
68 ### Permissions
69
70 * [drf-any-permissions][drf-any-permissions] - Provides alternative permission handling.
71 * [djangorestframework-composed-permissions][djangorestframework-composed-permissions] - Provides a simple way to define complex permissions.
72 * [rest_condition][rest-condition] - Another extension for building complex permissions in a simple and convenient way.
73 * [dry-rest-permissions][dry-rest-permissions] - Provides a simple way to define permissions for individual api actions.
74 * [drf-access-policy][drf-access-policy] - Declarative and flexible permissions inspired by AWS' IAM policies.
75 * [drf-psq][drf-psq] - An extension that gives support for having action-based **permission_classes**, **serializer_class**, and **queryset** dependent on permission-based rules.
76 * [axioms-drf-py][axioms-drf-py] - Supports authentication and claim-based fine-grained authorization (**scopes**, **roles**, **groups**, **permissions**, etc. including object-level checks) using JWT tokens issued by an OAuth2/OIDC Authorization Server.
77
78 ### Serializers
79
80 * [django-rest-framework-mongoengine][django-rest-framework-mongoengine] - Serializer class that supports using MongoDB as the storage layer for Django REST framework.
81 * [djangorestframework-gis][djangorestframework-gis] - Geographic add-ons
82 * [django-pydantic-field][django-pydantic-field] - Provides a way to use Pydantic models as schemas for Django's JSONField with full support for Pydantic v1 and v2, type safety and integration with Django REST Framework.
83 * [drf-pydantic][drf-pydantic] - Use Pydantic with Django REST framework for data validation and (de)serialization.
84 * [djangorestframework-hstore][djangorestframework-hstore] - Serializer class to support django-hstore DictionaryField model field and its schema-mode feature.
85 * [djangorestframework-jsonapi][djangorestframework-jsonapi] - Provides a parser, renderer, serializers, and other tools to help build an API that is compliant with the jsonapi.org spec.
86 * [html-json-forms][html-json-forms] - Provides an algorithm and serializer to process HTML JSON Form submissions per the (inactive) spec.
87 * [django-rest-framework-serializer-extensions][drf-serializer-extensions] -
88 Enables black/whitelisting fields, and conditionally expanding child serializers on a per-view/request basis.
89 * [djangorestframework-queryfields][djangorestframework-queryfields] - Serializer mixin allowing clients to control which fields will be sent in the API response.
90 * [drf-flex-fields][drf-flex-fields] - Serializer providing dynamic field expansion and sparse field sets via URL parameters.
91 * [drf-action-serializer][drf-action-serializer] - Serializer providing per-action fields config for use with ViewSets to prevent having to write multiple serializers.
92 * [djangorestframework-dataclasses][djangorestframework-dataclasses] - Serializer providing automatic field generation for Python dataclasses, like the built-in ModelSerializer does for models.
93 * [django-restql][django-restql] - Turn your REST API into a GraphQL like API(It allows clients to control which fields will be sent in a response, uses GraphQL like syntax, supports read and write on both flat and nested fields).
94 * [graphwrap][graphwrap] - Transform your REST API into a fully compliant GraphQL API with just two lines of code. Leverages [Graphene-Django](https://docs.graphene-python.org/projects/django/en/latest/) to dynamically build, at runtime, a GraphQL ObjectType for each view in your API.
95 * [drf-shapeless-serializers][drf-shapeless-serializers] - Dynamically assemble, configure, and shape your Django Rest Framework serializers at runtime, much like connecting Lego bricks.
96
97 ### Serializer fields
98
99 * [drf-compound-fields][drf-compound-fields] - Provides "compound" serializer fields, such as lists of simple values.
100 * [drf-extra-fields][drf-extra-fields] - Provides extra serializer fields.
101 * [django-versatileimagefield][django-versatileimagefield] - Provides a drop-in replacement for Django's stock `ImageField` that makes it easy to serve images in multiple sizes/renditions from a single field. For DRF-specific implementation docs, [click here][django-versatileimagefield-drf-docs].
102
103 ### Views
104
105 * [django-rest-multiple-models][django-rest-multiple-models] - Provides a generic view (and mixin) for sending multiple serialized models and/or querysets via a single API request.
106 * [drf-typed-views][drf-typed-views] - Use Python type annotations to validate/deserialize request parameters. Inspired by API Star, Hug and FastAPI.
107 * [rest-framework-actions][rest-framework-actions] - Provides control over each action in ViewSets. Serializers per action, method.
108
109 ### Routers
110
111 * [drf-nested-routers][drf-nested-routers] - Provides routers and relationship fields for working with nested resources.
112 * [wq.db.rest][wq.db.rest] - Provides an admin-style model registration API with reasonable default URLs and viewsets.
113
114 ### Parsers
115
116 * [djangorestframework-msgpack][djangorestframework-msgpack] - Provides MessagePack renderer and parser support.
117 * [djangorestframework-jsonapi][djangorestframework-jsonapi] - Provides a parser, renderer, serializers, and other tools to help build an API that is compliant with the jsonapi.org spec.
118 * [djangorestframework-camel-case][djangorestframework-camel-case] - Provides camel case JSON renderers and parsers.
119 * [nested-multipart-parser][nested-multipart-parser] - Provides nested parser for http multipart request
120
121 ### Renderers
122
123 * [djangorestframework-csv][djangorestframework-csv] - Provides CSV renderer support.
124 * [djangorestframework-jsonapi][djangorestframework-jsonapi] - Provides a parser, renderer, serializers, and other tools to help build an API that is compliant with the jsonapi.org spec.
125 * [drf_ujson2][drf_ujson2] - Implements JSON rendering using the UJSON package.
126 * [rest-pandas][rest-pandas] - Pandas DataFrame-powered renderers including Excel, CSV, and SVG formats.
127 * [djangorestframework-rapidjson][djangorestframework-rapidjson] - Provides rapidjson support with parser and renderer.
128
129 ### Filtering
130
131 * [djangorestframework-chain][djangorestframework-chain] - Allows arbitrary chaining of both relations and lookup filters.
132 * [django-url-filter][django-url-filter] - Allows a safe way to filter data via human-friendly URLs. It is a generic library which is not tied to DRF but it provides easy integration with DRF.
133 * [drf-url-filter][drf-url-filter] is a simple Django app to apply filters on drf `ModelViewSet`'s `Queryset` in a clean, simple and configurable way. It also supports validations on incoming query params and their values.
134 * [django-rest-framework-guardian][django-rest-framework-guardian] - Provides integration with django-guardian, including the `DjangoObjectPermissionsFilter` previously found in DRF.
135
136 ### Misc
137
138 * [drf-sendables][drf-sendables] - User messages for Django REST Framework
139 * [cookiecutter-django-rest][cookiecutter-django-rest] - A cookiecutter template that takes care of the setup and configuration so you can focus on making your REST apis awesome.
140 * [djangorestrelationalhyperlink][djangorestrelationalhyperlink] - A hyperlinked serializer that can can be used to alter relationships via hyperlinks, but otherwise like a hyperlink model serializer.
141 * [django-rest-framework-proxy][django-rest-framework-proxy] - Proxy to redirect incoming request to another API server.
142 * [gaiarestframework][gaiarestframework] - Utils for django-rest-framework
143 * [drf-extensions][drf-extensions] - A collection of custom extensions
144 * [ember-django-adapter][ember-django-adapter] - An adapter for working with Ember.js
145 * [django-versatileimagefield][django-versatileimagefield] - Provides a drop-in replacement for Django's stock `ImageField` that makes it easy to serve images in multiple sizes/renditions from a single field. For DRF-specific implementation docs, [click here][django-versatileimagefield-drf-docs].
146 * [drf-api-logger][drf-api-logger] - Provides configurable request and response logging for Django REST Framework, with data masking, optional profiling, and Django admin views.
147 * [drf-api-tracking][drf-api-tracking] - Utilities to track requests to DRF API views.
148 * [drf_tweaks][drf_tweaks] - Serializers with one-step validation (and more), pagination without counts and other tweaks.
149 * [django-rest-framework-braces][django-rest-framework-braces] - Collection of utilities for working with Django Rest Framework. The most notable ones are [FormSerializer](https://django-rest-framework-braces.readthedocs.io/en/latest/overview.html#formserializer) and [SerializerForm](https://django-rest-framework-braces.readthedocs.io/en/latest/overview.html#serializerform), which are adapters between DRF serializers and Django forms.
150 * [drf-haystack][drf-haystack] - Haystack search for Django Rest Framework
151 * [django-rest-framework-version-transforms][django-rest-framework-version-transforms] - Enables the use of delta transformations for versioning of DRF resource representations.
152 * [django-rest-messaging][django-rest-messaging], [django-rest-messaging-centrifugo][django-rest-messaging-centrifugo] and [django-rest-messaging-js][django-rest-messaging-js] - A real-time pluggable messaging service using DRM.
153 * [djangorest-alchemy][djangorest-alchemy] - SQLAlchemy support for REST framework.
154 * [djangorestframework-datatables][djangorestframework-datatables] - Seamless integration between Django REST framework and [Datatables](https://datatables.net).
155 * [django-rest-framework-condition][django-rest-framework-condition] - Decorators for managing HTTP cache headers for Django REST framework (ETag and Last-modified).
156 * [django-rest-witchcraft][django-rest-witchcraft] - Provides DRF integration with SQLAlchemy with SQLAlchemy model serializers/viewsets and a bunch of other goodies
157 * [djangorestframework-mvt][djangorestframework-mvt] - An extension for creating views that serve Postgres data as Map Box Vector Tiles.
158 * [drf-viewset-profiler][drf-viewset-profiler] - Lib to profile all methods from a viewset line by line.
159 * [djangorestframework-features][djangorestframework-features] - Advanced schema generation and more based on named features.
160 * [django-elasticsearch-dsl-drf][django-elasticsearch-dsl-drf] - Integrate Elasticsearch DSL with Django REST framework. Package provides views, serializers, filter backends, pagination and other handy add-ons.
161 * [django-lisan][django-lisan] - A lightweight translation and localization framework for Django REST Framework APIs.
162 * [django-api-client][django-api-client] - DRF client that groups the Endpoint response, for use in CBVs and FBV as if you were working with Django's Native Models..
163 * [fast-drf] - A model based library for making API development faster and easier.
164 * [django-requestlogs] - Providing middleware and other helpers for audit logging for REST framework.
165 * [drf-standardized-errors][drf-standardized-errors] - DRF exception handler to standardize error responses for all API endpoints.
166 * [drf-api-action][drf-api-action] - uses the power of DRF also as a library functions
167 * [apitally] - A simple API monitoring, analytics, and request logging tool using middleware. For DRF-specific setup guide, [click here](https://docs.apitally.io/frameworks/django-rest-framework).
168 * [wireup][wireup] - Dependency injection container with Django integration support. For integration docs, [click here][wireup-django-docs].
169
170 ### Customization
171
172 * [drf-restwind][drf-restwind] - a modern re-imagining of the Django REST Framework utilizes TailwindCSS and DaisyUI to provide flexible and customizable UI solutions with minimal coding effort.
173 * [drf-redesign][drf-redesign] - A project that gives a fresh look to the browse-able API using Bootstrap 5.
174 * [drf-material][drf-material] - A project that gives a sleek and elegant look to the browsable API using Material Design.
175
176 [drf-sendables]: https://github.com/amikrop/drf-sendables
177 [cite]: http://www.software-ecosystems.com/Software_Ecosystems/Ecosystems.html
178 [cookiecutter]: https://github.com/jpadilla/cookiecutter-django-rest-framework
179 [new-repo]: https://github.com/new
180 [create-a-repo]: https://help.github.com/articles/create-a-repo/
181 [pypi-register]: https://pypi.org/account/register/
182 [semver]: https://semver.org/
183 [tox-docs]: https://tox.readthedocs.io/en/latest/
184 [drf-compat]: https://github.com/encode/django-rest-framework/blob/main/rest_framework/compat.py
185 [rest-framework-grid]: https://www.djangopackages.com/grids/g/django-rest-framework/
186 [drf-create-pr]: https://github.com/encode/django-rest-framework/compare
187 [authentication]: ../api-guide/authentication.md
188 [permissions]: ../api-guide/permissions.md
189 [third-party-packages]: #existing-third-party-packages
190 [discussion-group]: https://groups.google.com/forum/#!forum/django-rest-framework
191 [drf-auth-kit]: https://github.com/huynguyengl99/drf-auth-kit
192 [djangorestframework-digestauth]: https://github.com/juanriaza/django-rest-framework-digestauth
193 [django-oauth-toolkit]: https://github.com/evonove/django-oauth-toolkit
194 [djangorestframework-jwt]: https://github.com/GetBlimp/django-rest-framework-jwt
195 [djangorestframework-simplejwt]: https://github.com/davesque/django-rest-framework-simplejwt
196 [hawkrest]: https://github.com/kumar303/hawkrest
197 [djangorestframework-httpsignature]: https://github.com/etoccalino/django-rest-framework-httpsignature
198 [djoser]: https://github.com/sunscrapers/djoser
199 [drf-any-permissions]: https://github.com/kevin-brown/drf-any-permissions
200 [djangorestframework-composed-permissions]: https://github.com/niwibe/djangorestframework-composed-permissions
201 [rest-condition]: https://github.com/caxap/rest_condition
202 [django-rest-framework-mongoengine]: https://github.com/umutbozkurt/django-rest-framework-mongoengine
203 [djangorestframework-gis]: https://github.com/djangonauts/django-rest-framework-gis
204 [djangorestframework-hstore]: https://github.com/djangonauts/django-rest-framework-hstore
205 [drf-compound-fields]: https://github.com/estebistec/drf-compound-fields
206 [drf-extra-fields]: https://github.com/Hipo/drf-extra-fields
207 [django-rest-multiple-models]: https://github.com/MattBroach/DjangoRestMultipleModels
208 [drf-nested-routers]: https://github.com/alanjds/drf-nested-routers
209 [wq.db.rest]: https://wq.io/docs/about-rest
210 [djangorestframework-msgpack]: https://github.com/juanriaza/django-rest-framework-msgpack
211 [djangorestframework-camel-case]: https://github.com/vbabiy/djangorestframework-camel-case
212 [nested-multipart-parser]: https://github.com/remigermain/nested-multipart-parser
213 [djangorestframework-csv]: https://github.com/mjumbewu/django-rest-framework-csv
214 [drf_ujson2]: https://github.com/Amertz08/drf_ujson2
215 [rest-pandas]: https://github.com/wq/django-rest-pandas
216 [djangorestframework-rapidjson]: https://github.com/allisson/django-rest-framework-rapidjson
217 [djangorestframework-chain]: https://github.com/philipn/django-rest-framework-chain
218 [djangorestrelationalhyperlink]: https://github.com/fredkingham/django_rest_model_hyperlink_serializers_project
219 [django-rest-framework-proxy]: https://github.com/eofs/django-rest-framework-proxy
220 [gaiarestframework]: https://github.com/AppsFuel/gaiarestframework
221 [drf-extensions]: https://github.com/chibisov/drf-extensions
222 [ember-django-adapter]: https://github.com/dustinfarris/ember-django-adapter
223 [dj-rest-auth]: https://github.com/iMerica/dj-rest-auth
224 [django-versatileimagefield]: https://github.com/WGBH/django-versatileimagefield
225 [django-versatileimagefield-drf-docs]:https://django-versatileimagefield.readthedocs.io/en/latest/drf_integration.html
226 [drf-api-logger]: https://github.com/vishalanandl177/DRF-API-Logger
227 [drf-api-tracking]: https://github.com/lingster/drf-api-tracking
228 [django-rest-framework-braces]: https://github.com/dealertrack/django-rest-framework-braces
229 [dry-rest-permissions]: https://github.com/FJNR-inc/dry-rest-permissions
230 [django-url-filter]: https://github.com/miki725/django-url-filter
231 [drf-url-filter]: https://github.com/manjitkumar/drf-url-filters
232 [cookiecutter-django-rest]: https://github.com/agconti/cookiecutter-django-rest
233 [drf-haystack]: https://drf-haystack.readthedocs.io/en/latest/
234 [django-rest-framework-version-transforms]: https://github.com/mrhwick/django-rest-framework-version-transforms
235 [djangorestframework-jsonapi]: https://github.com/django-json-api/django-rest-framework-json-api
236 [html-json-forms]: https://github.com/wq/html-json-forms
237 [django-rest-messaging]: https://github.com/raphaelgyory/django-rest-messaging
238 [django-rest-messaging-centrifugo]: https://github.com/raphaelgyory/django-rest-messaging-centrifugo
239 [django-rest-messaging-js]: https://github.com/raphaelgyory/django-rest-messaging-js
240 [drf_tweaks]: https://github.com/ArabellaTech/drf_tweaks
241 [drf-oidc-auth]: https://github.com/ByteInternet/drf-oidc-auth
242 [drf-serializer-extensions]: https://github.com/evenicoulddoit/django-rest-framework-serializer-extensions
243 [djangorestframework-queryfields]: https://github.com/wimglenn/djangorestframework-queryfields
244 [drfpasswordless]: https://github.com/aaronn/django-rest-framework-passwordless
245 [djangorest-alchemy]: https://github.com/dealertrack/djangorest-alchemy
246 [djangorestframework-datatables]: https://github.com/izimobil/django-rest-framework-datatables
247 [django-rest-framework-condition]: https://github.com/jozo/django-rest-framework-condition
248 [django-rest-witchcraft]: https://github.com/shosca/django-rest-witchcraft
249 [drf-access-policy]: https://github.com/rsinger86/drf-access-policy
250 [drf-flex-fields]: https://github.com/rsinger86/drf-flex-fields
251 [drf-typed-views]: https://github.com/rsinger86/drf-typed-views
252 [drf-action-serializer]: https://github.com/gregschmit/drf-action-serializer
253 [djangorestframework-dataclasses]: https://github.com/oxan/djangorestframework-dataclasses
254 [django-restql]: https://github.com/yezyilomo/django-restql
255 [djangorestframework-mvt]: https://github.com/corteva/djangorestframework-mvt
256 [django-rest-framework-guardian]: https://github.com/rpkilby/django-rest-framework-guardian
257 [drf-viewset-profiler]: https://github.com/fvlima/drf-viewset-profiler
258 [djangorestframework-features]: https://github.com/cloudcode-hungary/django-rest-framework-features/
259 [django-elasticsearch-dsl-drf]: https://github.com/barseghyanartur/django-elasticsearch-dsl-drf
260 [django-api-client]: https://github.com/rhenter/django-api-client
261 [drf-psq]: https://github.com/drf-psq/drf-psq
262 [django-rest-authemail]: https://github.com/celiao/django-rest-authemail
263 [graphwrap]: https://github.com/PaulGilmartin/graph_wrap
264 [rest-framework-actions]: https://github.com/AlexisMunera98/rest-framework-actions
265 [fast-drf]: https://github.com/iashraful/fast-drf
266 [wireup]: https://github.com/maldoinc/wireup
267 [wireup-django-docs]: https://maldoinc.github.io/wireup/latest/integrations/django/
268 [django-requestlogs]: https://github.com/Raekkeri/django-requestlogs
269 [drf-standardized-errors]: https://github.com/ghazi-git/drf-standardized-errors
270 [drf-api-action]: https://github.com/Ori-Roza/drf-api-action
271 [drf-restwind]: https://github.com/youzarsiph/drf-restwind
272 [drf-redesign]: https://github.com/youzarsiph/drf-redesign
273 [drf-material]: https://github.com/youzarsiph/drf-material
274 [django-pyoidc]: https://github.com/makinacorpus/django_pyoidc
275 [apitally]: https://github.com/apitally/apitally-py
276 [drf-shapeless-serializers]: https://github.com/khaledsukkar2/drf-shapeless-serializers
277 [django-lisan]: https://github.com/Nabute/django-lisan
278 [axioms-drf-py]: https://github.com/abhishektiwari/axioms-drf-py
279 [django-pydantic-field]: https://github.com/surenkov/django-pydantic-field
280 [drf-pydantic]: https://github.com/georgebv/drf-pydantic