After deciding to start learning FastAPI, I wanted to build something simple to understand how APIs actually work. So today, I built my very first API using FastAPI. Honestly, I expected backend development to feel complicated at first, but FastAPI made the setup surprisingly clean and beginner-friendly. Setting Up FastAPI First, I installed FastAPI and Uvicorn: pip install fastapi uvicorn Enter fullscreen mode Exit fullscreen mode Then I created a file called main.py. My First FastAPI Code from fastapi import FastAPI app = FastAPI () @app.get ( " / " ) def home (): return { " message " : " Hello FastAPI " } Enter fullscreen mode Exit fullscreen mode To run the server: uvicorn main:app --reload Enter fullscreen mode Exit fullscreen mode After running this command, my API started working locally. My First API Response When I opened: http://127.0.0.1:8000 I saw: { "message" : "Hello FastAPI" } Enter fullscreen mode Exit fullscreen mode It felt surprisingly satisfying seeing my first backend response working.β¦