Full-Stack & Backend Python Master: FastAPI, AsyncIO, Core & Internals
CPython memory management, the GIL, AsyncIO concurrency, FastAPI / Starlette, Pydantic v2 Rust core, SQLAlchemy 2.0, and Celery workflows.
Curriculum Roadmap & Learning Path
5 StagesPart 1: Candid Experience, Architecture & Intro (1 - 5)
5 QuestionsWhat is Python, and what are its core architectural characteristics (interpreted, dynamically typed, multi-paradigm)?
Walk me through your hands-on experience building Python backend applications, and how you decide between FastAPI, Flask, and Django.
Describe a severe Python backend performance bottleneck you resolved.
Strategy for dependency management and packaging:
Approach to automated testing in Python:
Part 2: Python Core Language, Internals & Runtime (6 - 25)
20 QuestionsMemory management in Python: Reference Counting & Generational GC:
What is the Global Interpreter Lock (GIL) and free-threaded Python?
Mutable vs Immutable data types:
`is` vs `==` and Integer Caching:
Python Decorators and `functools.wraps`:
Generators and the `yield` keyword:
The Iterator Protocol:
Context Managers and the `with` statement:
`*args`, `**kwargs`, positional-only and keyword-only arguments:
Dunder methods: `__str__` vs `__repr__`, `__new__` vs `__init__`:
Multiple Inheritance and Method Resolution Order (MRO):
Metaclasses in Python:
`__slots__` and memory reduction:
`@staticmethod` vs `@classmethod` vs Instance Methods:
Shallow Copy (`copy.copy()`) vs Deep Copy (`copy.deepcopy()`);
Dataclasses vs NamedTuple vs Pydantic:
Exception Chaining (`raise ... from ...`):
First-Class Functions:
List, Dict, and Set Comprehensions:
The `dis` module and CPython Bytecode:
Part 3: Asynchronous Programming & Concurrency (26 - 40)
15 QuestionsThreading vs Multiprocessing vs AsyncIO:
AsyncIO: Coroutines, Tasks, and Futures:
Blocking the Event Loop & offloading to threads:
`asyncio.gather()` vs `asyncio.TaskGroup()`:
`wait()` vs `as_completed()` vs `shield()`:
Async Context Managers & Async Iterators:
CPU-bound vs I/O-bound scaling:
Process Pools vs Thread Pools and Shared State:
Race Conditions and Locks:
Deadlocks in multi-threaded applications:
I/O Multiplexing (`epoll` / `kqueue`):
Graceful AsyncIO Shutdown:
AnyIO and Structured Concurrency:
Producer-Consumer with `asyncio.Queue`:
Gunicorn with Uvicorn Workers:
Part 4: Web Frameworks, APIs & FastAPI (41 - 55)
15 QuestionsWhy FastAPI achieves high performance:
WSGI vs ASGI:
FastAPI Dependency Injection (`Depends()`):
Pydantic v2 performance boost:
`async def` vs standard `def` in FastAPI endpoints:
BackgroundTasks vs Celery:
FastAPI Middleware:
Centralized Exception Handling in FastAPI:
Application Factory Pattern in Flask:
Flask Contexts: Application vs Request Context:
JWT Authentication with Refresh Token Rotation:
Server-Sent Events (SSE) in FastAPI:
API Rate Limiting with Redis:
OpenAPI (Swagger) Customization in FastAPI:
Secure File Uploads: `UploadFile` vs `bytes`:
Part 5: ORMs, Databases & Background Workers (56 - 65)
10 QuestionsSQLAlchemy 2.0 vs Legacy 1.x:
Unit of Work and Identity Map:
Async SQLAlchemy with `asyncpg`:
N+1 Query Elimination in SQLAlchemy:
Alembic Migration Best Practices:
Celery Architecture: Broker & Result Backend:
Celery Retries & Task Idempotency:
Celery Canvas Workflows:
Preventing Worker Memory Leaks:
Alternatives to Celery (ARQ, Dramatiq):