Python

Building a Multi-Stage ETL That Doesn't Lose Work Under Failure with NATS JetStream

A walkthrough of the backpressure-aware ingestion pipeline in EvidenceLens: durable consumers, manual acknowledgment, how a 60-second ack_wait caused a redelivery storm under load, and a backpressure loop that pauses consumption when the downstream indexer falls behind.

Intermediate
25 minutes
Aug 5, 2026

Stop Copying Response Boilerplate Across Every Endpoint: Build a Typed Generic Envelope in Pydantic v2

Learn how to use Python's `Generic[T]` protocol with Pydantic v2's `BaseModel` to create a single, typed response envelope that propagates concrete type information through to OpenAPI schema generation, provides consistent operational metadata across all endpoints without repetition, and enforces field-level constraints on both inbound and outbound data.

Beginner
6 minutes
Oct 10, 2025
    Ask me anything!