title: "Python developer's introduction to designing an API and choosing your framework(s)"
date: 2024-06-30T09:00:00-07:00
draft: true
tags:
- "django"
- "FastAPI"
---
This article is written for anyone currently evaluating how to choose an API Framework (FastAPI, django-ninja etc.) and wondering how to setup a project from scratch, using SQLAlchemy or Django for ORM.
We're focusing on choice and preferences. The objective is to make something that's confusing/annoying/energy-draining feel more comfortable and go from frozen 🥶 to cruising 🚄.
One of the reasons why it's good to have this approach, is that most ORMs and API frameworks can be decoupled. But it's good to narrow down your search from the beginning. If you already have a strong preference for SQLAlchemy or Django, you should be comfortable with that choice.
* You will have to do more work with SQLAlchemy and FastAPI. For instance, database session management, migrations, test rollbacks etc. We didn't identify any benefits of having this control.. it seems to just add work. These things are built into Django for good reasons.
* Async support is definitely a strength of FastAPI. However, whether that is actually of value is highly dependent on the problem being solved, as the async structures may be perceived as a negative impact on readability, adding efforts to development and testing.