Python Backend Developer
Ship Python APIs with FastAPI and Pydantic: request validation, async pitfalls, SQLAlchemy data access, JWT auth, and the import bugs that bite in production.
Path overview
Python 后端的分水岭在于把“能跑的脚本”变成“可运维的服务”。本路径沿 FastAPI 与 Pydantic 的校验链路推进,直面同步端点阻塞事件循环、gather 取消兄弟任务等高频事故,再接入 SQLAlchemy 与 JWT,收尾于可运行项目与启动模板。
This path turns runnable scripts into operable services: FastAPI request validation with Pydantic, the async pitfalls that stall an event loop, SQLAlchemy data access, JWT auth, and a deployable starter.
Read "How to Validate Forms with Pydantic in Python" for the "Install Pydantic with email support" argument, then name the decision in python work it would change.
Next step: FastAPI
⏱ 1h
Read "FastAPI"'s documented surface around "Modern, fast Python web framework for building APIs with automatic OpenAPI docs and type", then build a minimal endpoint and log the response.
Prerequisites: How to Validate Forms with Pydantic in Python
Next step: FastAPI Form Validation with Pydantic
⏱ 1h
Run the python snippet "FastAPI Form Validation with Pydantic", capture stdout, and show which line demonstrates the documented behavior: "Validate form data in FastAPI using Pydantic models with custom validators, field".
Prerequisites: FastAPI
Next step: Pydantic
⏱ 0.75h
Wire "Pydantic" into a scratch python project, following "model_json_schema Model.model_json_schema(): dict", and record one working request/response pair.
Prerequisites: FastAPI Form Validation with Pydantic
Next step: How to Implement JWT Authentication in FastAPI
⏱ 1h
Read "How to Implement JWT Authentication in FastAPI" for the "Configure secrets and password hashing" argument, then name the decision in python work it would change.
Next step: SQLAlchemy
⏱ 1h
Read "SQLAlchemy"'s documented surface around "create_engine create_engine(url, **kwargs): Engine", then build a minimal endpoint and log the response.
Prerequisites: How to Implement JWT Authentication in FastAPI
Next step: FastAPI Hello API — Runnable Python Project
⏱ 1h
Run "uvicorn main:app --reload" in "FastAPI Hello API — Runnable Python Project" and compare the output with "Uvicorn running on http://127.0.0.1:8000. Swagger docs at /docs.".
Next step: FastAPI SQLAlchemy Starter
⏱ 2h
Stand up "FastAPI + SQLAlchemy REST API" from its CLI, then modify "FastAPI, SQLAlchemy, Pydantic, Alembic" and show the documented behavior still holds.
Prerequisites: FastAPI Hello API — Runnable Python Project
Next step: Compute an Exponential Backoff Schedule
⏱ 1.5h
In the "Python Backend Developer" path, implement "Compute an Exponential Backoff Schedule" so JSON object: { attempts, baseMs, factor, maxMs } yields {delays:[100,200,400,800],totalMs:1500}, including the second sample's edge case.
Prerequisites: FastAPI SQLAlchemy Starter
Next step: Run the exercise test command and commit the working solution.
⏱ 0.33h