A course for senior JS engineers

Python for JS Devs

Map what you already know onto Python, then go deep where it genuinely differs. Fundamentals → FastAPI → LLM APIs.

Stack uv · Python 3.13 · ruff Lessons 20 Goal Ship FastAPI services that call LLM APIs

Work through the lessons in order — each is a short, tightly-scoped win. Open one, do the hands-on task, take the quiz from memory, then come back to your teacher (the chat) with questions before moving on.

Phase 1 · Python fundamentals

The JS→Python translation layer. Own these and Python stops feeling foreign.

00How the Python engine works — under the hood: CPython vs V8, the GIL, GC
01From npm to uv — project setup & first run
02Variables, types & truthiness — is vs ==, None, falsy values
03Collections — list, dict, tuple, set
04Control flow & comprehensions — for-in, enumerate, comprehensions
05Functions & the mutable-default trap — *args, **kwargs, keyword args
06Type hints — the bridge to Pydantic & FastAPI
07Classes & dataclasses — self, __init__, dunders
08Modules, packages & imports — vs ESM/CommonJS
09Exceptions & error handling — try/except, raising, custom errors
10Async Python & the event loop — asyncio vs the JS loop

Phase 2 · FastAPI

Build real HTTP services — routes, validation, DI, DB, correct async.

11Your first FastAPI app — routes, uvicorn, auto docs
12Pydantic v2 models — validation & serialization
13Params & response models — path, query, body, response_model
14Dependency injection — Depends, shared logic, auth
15Errors & status codes — HTTPException, handlers
16Structuring a real project — routers, settings, layout
17The async blocking-I/O trap — the #1 FastAPI mistake
18Database access (SQLAlchemy 2.0) — typed ORM, sessions, select()

Phase 3 · LLM APIs

The payoff: FastAPI endpoints backed by OpenAI/Anthropic.

19Calling an LLM API — SDK, async client, keys, config
20Streaming LLM responses — StreamingResponse, SSE, no blocking

Reference (bookmark these)

💬 I'm your teacher. Do the lessons in order, and bring me anything that's unclear, any error you hit, or "why is it done this way?" questions. That's how the deep learning happens.