4 ms·
The biggest challenge I encountered when doing this exact thing was once you get beyond bootstrapping the project, and start implementing your first feature. G
by ryanisnan 6y ago
The biggest challenge I encountered when doing this exact thing was once you get beyond bootstrapping the project, and start implementing your first feature.
Great, you need an ORM, what do you choose?
Now you need a serializer, what do you choose?
What about validation, what do you choose?
Authentication, what do you choose?
A lot of these questions are boring and are not worth spending time thinking about. Almost all choices will leave you with some amount of headaches though (as will choosing Django).
The question to me boils down to... what questions am I interested in solving?
- travisjungroth 6y agoBy "doing this exact thing" do you mean making an API with FastAPI? Because you seem unfamiliar with its features. > Great, you need an ORM, what do you choose? SQLAlchemy. It's very popular. > Now you need a serializer, what do you choose? Pydantic, which is included. (Django doesn't include serializers). > What about validation, what do you choose? Pydantic. > Authentication, what do you choose? The included auth library.
- ryanisnan 6y agoIn a couple of attempts, I have worked with Flask and Falcon. My point isn't that there are solutions, my point is that you have to make decisions, all of which are likely to have rough edges.
- travisjungroth 6y agoAnd my point is that for your specific examples, you don't have to make decisions. Django and FastAPI both have 3/4 of the features you listed included. FastAPI is a tool made for making APIs. Django is not. So in that specific case, Django actually requires more decisions overall.
- Daishiman 6y agoDjango Rest Framework is the one-stop shop for APIs. Probably the most deployed API framework ever.
- travisjungroth 6y agoDRF to FastAPI is a more direct comparison. DRF is what I spent most of my Django time in. And if you like DRF, the author (Tom Christie) wrote Starlette. FastAPI is based on Starlette.