|
|
|
|
|
by rsinger87
2259 days ago
|
|
There is a package for DRF that adds automatic validation from type annotations:
https://github.com/rsinger86/drf-typed-views
(disclaimer: I'm the author) Regarding other commentary on DRF: I wonder how many pain points result from trying to squeeze non-CRUD operations into DRF's ModelViewSet/ModelSerializer constructs? My company's approach has been to use that DRF magic for dumb CRUD resources and use plain function-based views for everything else, with the freedom to use Pydantic/Marshmallow/etc. This has made us very productive and I can't image having to write create/update/delete/get/list operations one at a time. That said, I'm sure there are use cases that DRF isn't suited for and I would definitely look at FastAPI for new projects. |
|