Skip to content

Overview

You write TypeScript or Go backends. You know git, Docker, and cloud services cold. You have little or no modern Python — or you learned Python years ago and the ecosystem has moved on without you. This guide is built for exactly that.

It is example-driven: every concept has runnable code, and almost everything is shown three ways — the TypeScript way, the Go way, and the Python way — so you map what you already know onto Python instead of starting from scratch.

It is also aggressively modern. Python’s tooling went through a quiet revolution: uv replaced the pip/virtualenv/poetry tangle, ruff replaced black + flake8 + isort, type hints went from optional to expected, and async became a first-class way to build services. This guide teaches the 2026 stack only. Legacy tools get named once for context, then we move on.

  • You write TypeScript or Go backends professionally.
  • You know git, Docker, and cloud services well.
  • You have little or no current Python experience (or rusty, pre-3.10 Python).
  • You want to be productive on Python backends quickly — the modern way.

You need Python 3.13+ (we target 3.14), uv, and Docker. Module 01 walks through the toolchain in detail; the short version for the shared infrastructure is:

  1. Install uv (it manages Python itself — no separate Python install needed):

    Terminal window
    curl -LsSf https://astral.sh/uv/install.sh | sh
    uv python install 3.14
  2. Start all infrastructure (PostgreSQL, Redis, Kafka):

    Terminal window
    cd shared-infra && docker compose up -d
  3. Tear everything down when you’re done:

    Terminal window
    docker compose down -v
ToolVersion
Python3.14 (3.13+ fine)
uvlatest
Rufflatest
tylatest (mypy as the mature alternative)
FastAPIlatest
Pydanticv2
SQLAlchemy2.0 (async)
PostgreSQL17
Redis8
Kafka4.x (KRaft)
ModuleYou build
Dev Environment & ToolingA uv project from scratch with Ruff + ty, a JSON CLI tool
Modern TypingType hints, generics (PEP 695), Protocols, match — with TS/Go comparisons
Data Structures & Functional StyleDataclasses, comprehensions, itertools/functools, generators, a data pipeline
Pydantic & Typed Data ValidationPydantic v2 models, validators, typed settings
ModuleYou build
Async & Structured ConcurrencyA concurrent HTTP fetcher with TaskGroup, timeouts, cancellation
Streams & Background WorkAsync generators, queues, a real-time processing pipeline
ModuleYou build
FastAPI REST APIsA full CRUD API with dependency injection, lifespan, settings
Litestar — the same API, comparedThe same CRUD API in Litestar — compare both, pick your style
ModuleYou build
PostgreSQL AccessThe same queries four ways — raw asyncpg, SQLAlchemy Core, ORM, SQLModel — plus Alembic
Redis & CachingCache-aside, pub/sub, rate limiting
Event-Driven with KafkaA producer/consumer pipeline, dead letter queue, event sourcing
ModuleYou build
Testingpytest, pytest-asyncio, Hypothesis, Testcontainers — unit through integration
Security & AuthJWT auth, argon2 hashing, OAuth2, RBAC
API Design & SerializationREST + GraphQL (Strawberry) + gRPC, OpenAPI docs
ObservabilityStructured logging (structlog), OpenTelemetry traces, Prometheus metrics
ModuleYou build
Advanced PythonDecorators, context managers, descriptors, the GIL & free-threading, performance
Packaging & Deploymentuv-based multi-stage Docker, distroless images, GitHub Actions CI/CD, K8s manifests
ModuleYou build
Capstone: Notification ServiceA full microservice: API + DB + Cache + Kafka + Auth + Tests + Deploy

Pick a path based on your goal — modules are referenced by number.

Get productive fast (7 modules)

01 → 02 → 05 → 07 → 09 → 12 → 17

Complete backend (17 modules)

01 → 02 → 03 → 04 → 05 → 06 → 07 → 09 → 10 → 11 → 12 → 13 → 14 → 15 → 16 → 17 → 18

API-focused

01 → 02 → 04 → 07 → 09 → 12 → 13 → 14 → 17

Data & async focus

01 → 02 → 03 → 05 → 06 → 09 → 10 → 11

Each module is a lesson plus one or more hands-on exercises. Every exercise is a self-contained uv project with a worked solution:

  • Directorymodule-name/
    • the lesson content + side-by-side code examples
    • Directoryexercises/
      • Directoryproject-name/
        • pyproject.toml
        • docker-compose.yml if the exercise needs infrastructure
        • Directorysrc/

Building and running any exercise is the same uv dance:

Terminal window
uv sync # create the venv and install deps (like npm install)
uv run python -m app.main # run it (uv handles the venv for you)
uv run pytest # run tests

Tear down any module-specific Docker services with docker compose down -v.

All modules share one Docker Compose stack under shared-infra/:

ServicePortCredentials
PostgreSQL5432dev / dev / app
Redis6379no auth
Kafka29092no auth
Kafka UI8090browser
Terminal window
# Start everything
cd shared-infra && docker compose up -d
# Stop and wipe all data
docker compose down -v

Ready? Start with Dev Environment & Tooling.