'Can Django REST Framework serializers be used for other web-frameworks?
I want to use JSON serilization in my aiohttp.web application. But I haven't found any libraries for that task in aiohttp universe.
If there are any problem to use serilizers from django-rest-ramework with aiohttp?
Solution 1:[1]
Django REST framework is very closely tied to django itself. You could probably hack a setup where you were able to use a little of DRF with aiohttp but you would obviously lose most of what DRF does: routing, db/model integration, views, viewsets, authentication.
Much better to use one of the many other serialization and deserialization libraries available in python. I would recommend pydantic (admission: I developed pydantic), but there are loads of other such libraries.
The power of DRF comes from it's completeness and first class integration with django. Without that it's not a good choice. It's also very slow.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | SColvin |
