Python Performance and Production Patterns
Ship Python to production — profiling, caching, connection pooling, observability, and containerized deployment with measurable results.
View badge details
About This Course
Course Curriculum
12 Lessons
Profiling and Benchmarking
Teaching lab: Measurement first (don't guess, measure), cProfile for function-level profiling, line_profiler for line-by-line timing, memory_profiler for allocation tracking, timeit and perf_counter for benchmarks, common optimizations (generators/dict lookups/join). Company: StreamForge.
Profiling and Benchmarking - Lab Exercises
Measurement first (dont guess measure), cProfile for function-level profiling, line_profiler for line-by-line timing, memory_profiler for allocation tracking, timeit and perf_counter for benchmarks, common optimizations (generators/dict lookups/join)
Caching Strategies
Teaching lab: functools.lru_cache (maxsize/typed/stats), manual caching with TTL, Redis caching (get/set/expire), cache patterns (cache-aside/write-through/stampede prevention), what to cache vs not cache. Company: StreamForge.
Caching Strategies - Lab Exercises
functools.lru_cache (maxsize/typed/stats), manual caching with TTL, Redis caching (get/set/expire), cache patterns (cache-aside/write-through/stampede prevention), what to cache vs not cache
Connection Pooling and Resource Management
Teaching lab: Why pooling matters (connection per request problem), SQLAlchemy pool_size/max_overflow/pool_timeout, httpx AsyncClient as long-lived pool, context managers for cleanup, graceful shutdown with signal handlers. Company: StreamForge.
Connection Pooling and Resource Management - Lab Exercises
Why pooling matters (connection per request problem), SQLAlchemy pool_size/max_overflow/pool_timeout, httpx AsyncClient as long-lived pool, context managers for cleanup, graceful shutdown with signal handlers
Observability Logging Metrics and Tracing
Teaching lab: Structured logging with structlog (key-value/correlation IDs), Prometheus metrics (counters/histograms/gauges/metrics endpoint), OpenTelemetry tracing (spans/context propagation), alerting patterns (RED/USE methods), dashboard design. Company: StreamForge.
Observability Logging Metrics and Tracing - Lab Exercises
Structured logging with structlog (key-value/correlation IDs), Prometheus metrics (counters/histograms/gauges/metrics endpoint), OpenTelemetry tracing (spans/context propagation), alerting patterns (RED/USE methods), dashboard design
Packaging Distribution and Containers
Teaching lab: pyproject.toml for modern packaging, virtual environments and dependency locking, multi-stage Dockerfiles for Python, Docker Compose for multi-service dev, CI/CD pipeline (lint/typecheck/test/build/deploy). Company: StreamForge.
Packaging Distribution and Containers - Lab Exercises
pyproject.toml for modern packaging, virtual environments and dependency locking, multi-stage Dockerfiles for Python, Docker Compose for multi-service dev, CI/CD pipeline (lint/typecheck/test/build/deploy)
Capstone Briefing Production Hardening
Teaching lab: Capstone briefing - take unoptimized FastAPI app and make it production-ready. Profile top 3 bottlenecks, apply caching, configure connection pooling, add structured logging + Prometheus metrics + OpenTelemetry, package with multi-stage Dockerfile + Docker Compose. Company: StreamForge.
Capstone Production Hardening
Capstone: take unoptimized FastAPI app and make it production-ready - profile top 3 bottlenecks, apply caching (lru_cache + Redis), configure connection pooling, add structured logging + Prometheus metrics + OpenTelemetry, package with multi-stage Dockerfile + Docker Compose, benchmark before/after with measurable improvement