FastAPI

DuckDB as an Analytical Read Layer: Querying a Gold Store Without a Database Server

DuckDB is an in-process analytical database that runs inside your Python application, reads Parquet files natively, and handles complex SQL including window functions, QUALIFY, and MEDIAN — with no server to manage. This tutorial covers the read-only connection pattern used in the flight disruption serving layer, thread-safety in a FastAPI threadpool, and the queries that power the reliability API.

Beginner
9 minutes
Aug 10, 2026

FastAPI for ML Serving: Lifespan, Pydantic Validation, and Graceful Degradation

FastAPI's type annotations, Pydantic models, and lifespan context manager solve three common ML serving problems: loading expensive artifacts before requests start, validating inputs without manual checks, and returning useful errors when dependencies aren't ready. This tutorial walks through the patterns used in the flight disruption prediction API.

Beginner
10 minutes
Aug 10, 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

Flight Disruption Intelligence: A Full-Stack Delay Predictor on Public Data and Free Infrastructure

An end-to-end flight delay prediction platform spanning medallion lakehouse, calibrated LightGBM with SHAP explanations, Spark Structured Streaming, dbt reliability marts, FastAPI serving, and a SvelteKit dashboard — built entirely on public BTS/NOAA/OpenSky data, self-hostable for $0/year, with a contract module that enforces leakage prevention across every pipeline stage.

EvidenceLens: A Self-Hosted Biomedical Search Engine with Hybrid Ranking and Conflict-of-Interest Transparency

EvidenceLens unifies 20+ fragmented medical literature sources into a single hybrid-ranked interface, surfaces author conflict-of-interest badges from public CMS Open Payments data, and runs answer synthesis entirely on the user's own inference key — zero recurring backend cost.

    Ask me anything!