The engineering notebook
RSS feed#python
Articles, practical guides, and engineering notes on python.
By Ashish Bhakhand 108 published articles
Explore the articles
20 articles
Reset filtersuv, Ruff, and pytest: A Modern Python Backend Toolchain
Use a small, explicit toolchain for dependency management, formatting, linting, security checks, and behavioral tests.
Rate Limiting Is a Product Policy, Not Just Middleware
Choose identities, limits, storage, status codes, and retry behavior based on cost and user experience.
Reliable Webhooks with Authentication, Deduplication, and Reconciliation
Turn provider callbacks into durable, idempotent state changes that remain correct across retries and delayed events.
Building Resumable Backfills Instead of One Giant Sync
Process historical data in bounded windows with durable progress, overlapping retries, and idempotent writes.
Idempotent Mobile Health Backfills Across Reinstalls and Devices
Use semantic identities and natural keys so repeated health imports repair missing history without inflating aggregates.
Database Migrations Are Executable Architecture
Treat schema changes, constraints, backfills, compatibility, and cutovers as reviewed application design rather than deployment chores.
Testing FastAPI Without Starting the Real Application
Build focused test applications, override dependencies, and test services at their natural boundaries without production infrastructure.
Privacy-Safe Observability in a Health Application
Preserve enough context to diagnose production failures without turning logs and error tracking into stores of sensitive user data.
Strict JWT Validation Without Algorithm Confusion
Validate JWT algorithms, signatures, issuers, audiences, and required claims deliberately before trusting user identity.