inPace
All coursesكل الدورات

FastAPI: from first API to production

  • about 12 h of lessonsحوالي 12 ساعة من الدروس
  • 12 modulesوحدات · 35 lessonsدروس
  • Englishالإنجليزية

Build real web APIs with FastAPI: validation, databases, logins, async, testing, WebSockets, Docker and monitoring. Ends with a portfolio project.

byمن إعداد inPace checkedموثّق

pythonfastapiwebapibackend

On these roadmaps:ضمن هذه المسارات: Python backend developer, مطوّر باك إند بايثون, Get hired as an AI engineer, التوظيف مهندس ذكاء اصطناعي

What's insideمحتوى الدورة

Each module ends with tasks. The next module opens when they're done.تنتهي كل وحدة بمهام، وتُفتح الوحدة التالية عند إنجازها.

  1. Getting started 3 lessonsدروس · 40 min د
    • What FastAPI is10 min د
    • Install and run your first app15 min د
    • Path operations and HTTP methods15 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 3 questionsأسئلة
  2. Parameters and validation 4 lessonsدروس · 85 min د
    • Path and query parameters20 min د
    • Validation with Annotated, Query and Path20 min د
    • Request bodies with Pydantic models25 min د
    • Headers, cookies, forms and files20 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 3 questionsأسئلة
  3. Responses and errors 3 lessonsدروس · 55 min د
    • Response models: control what goes out20 min د
    • Status codes and HTTPException15 min د
    • Custom error handlers and other responses20 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 3 questionsأسئلة
  4. Dependency injection 3 lessonsدروس · 60 min د
    • Depends: share logic between endpoints20 min د
    • Classes, sub-dependencies and where to attach them20 min د
    • Dependencies with yield, and overriding them20 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 3 questionsأسئلة
  5. Databases with SQLAlchemy 3 lessonsدروس · 70 min د
    • Models and sessions (SQLAlchemy 2.0)25 min د
    • Async databases and the N+1 problem25 min د
    • Migrations with Alembic20 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 3 questionsأسئلة
  6. Security and authentication 3 lessonsدروس · 70 min د
    • Passwords and the OAuth2 password flow25 min د
    • JWT tokens and the current user25 min د
    • Permissions, CORS and other protections20 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 3 questionsأسئلة
  7. Async, background work and app lifecycle 3 lessonsدروس · 60 min د
    • async def vs def: don't block the event loop25 min د
    • Background tasks and job queues15 min د
    • Lifespan, app state and middleware20 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 3 questionsأسئلة
  8. Testing 3 lessonsدروس · 60 min د
    • Testing with TestClient and pytest20 min د
    • A test database and fake users25 min د
    • Async tests15 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 3 questionsأسئلة
  9. Structuring bigger apps 3 lessonsدروس · 55 min د
    • Routers and project layout20 min د
    • Settings and configuration15 min د
    • A great OpenAPI and API versioning20 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 3 questionsأسئلة
  10. Real-time and advanced HTTP 3 lessonsدروس · 65 min د
    • WebSockets25 min د
    • Streaming and Server-Sent Events20 min د
    • Pagination, caching and idempotency20 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 3 questionsأسئلة
  11. Production and deployment 3 lessonsدروس · 60 min د
    • Running FastAPI in production20 min د
    • Docker20 min د
    • Logging, metrics and tracing20 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 3 questionsأسئلة
  12. Final project 1 lessonsدروس · 30 min د
    • Build the Library API30 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 3 questionsأسئلة

Read a lesson firstاقرأ درسًا أولًا

What FastAPI is

FastAPI is a Python framework for building web APIs: programs that other programs (a website, a phone app, another service) talk to over HTTP and get JSON back.

Why people pick it

  • Type hints do the work. You write normal Python type hints, and FastAPI uses them to read the request, check it, convert it, and document it.
  • Validation for free. If a client sends "abc" where you asked for an int, FastAPI answers with a clear 422 error before your code even runs.
  • Docs for free. Every API gets interactive docs at /docs (Swagger UI) and /redoc, built from an OpenAPI description at /openapi.json.
  • Fast. It runs on ASGI servers like Uvicorn and supports async, so one process can handle many requests that are waiting on a database or another API.

What it's built on

Piece Job
Starlette The web toolkit: routing, requests, responses, WebSockets, middleware
Pydantic Data models and validation
Uvicorn The ASGI server that actually listens on a port

You will mostly use FastAPI's own API, but knowing these three pieces helps when you read error messages and docs.

What you'll build in this course

By the end you'll have a real API with a database, logins, tests, background work, WebSockets and a Docker image ready for production. Each module ends with a task where you build a piece of it.

Licenseالرخصة: CC-BY-4.0 · Updatedآخر تحديث 2026-11-12

Add to inPaceأضف إلى inPace