r/Backend • • 3d ago

FASTAPI

hi i wanna learn fastapi for ml projects, dont know anything about backend so what all do i need to know like what topics, any playlist you can recommend with backend basics to a point where i can finally start to learn fastapi?

19 Upvotes

13 comments sorted by

2

u/PhilosopherOther1360 2d ago

The fastapi documentation is actually pretty good

1

u/Commercial_You- 7h ago

yeah its nice, had a look at it

1

u/Discordbothost 2d ago

Try a POST /predict route that returns a fixed label first. In /docs, send one valid request and one with a required field missing. Once both behave as expected, swap the fixed label for your model.

1

u/Commercial_You- 7h ago

will try, thanks

1

u/nn_gyunx 2d ago

Skip the playlists and work through the FastAPI tutorial in order, but the parts that actually bite you later are the boring fundamentals: what each status code promises the client, how request and response bodies map to pydantic models, and where you catch exceptions so bad input comes back as a 422 instead of a 500. Learn one real database with migrations next to it and keep config in env vars from day one, or you'll be rewriting half the app the first time you deploy it. For ML serving specifically, load the model once at startup instead of per request, keep inference off the event loop, and put a timeout on predictions so one slow model call doesn't take your health check down with it.

1

u/Commercial_You- 7h ago

thank you so much

1

u/Adorable_Expert_7350 1d ago

You don't need to learn the entire backend ecosystem before starting FastAPI. Focus on HTTP, REST APIs, JSON, request/response handling, status codes, and basic SQL first. Then jump into FastAPI and build a simple ML prediction API; learn the advanced backend concepts as your projects demand them.

1

u/Electronic-Run5947 3d ago

Use any playlist, like freecodecamp.org, any YT channel with most views, and ur understanding. Learn fundamentals and basic, and then merge urself into ML.

6

u/real_MysteryBeans 3d ago

The official FastAPI docs have a tutorial that walks you through building a full app step by step, way more useful than random playlists for getting something running quickly. Since you're aiming for ML, focus heavy on the request/response models and file uploads right after you get the basics down.

1

u/Electronic-Run5947 3d ago

Thnx for the info