Archives
All the articles I've archived.
Python API Framework Benchmark: FastAPI vs Litestar vs DRF vs Django Ninja vs Django Bolt - Real Database Queries and JWT Cookie Auth
Ten framework and server configs benchmarked on real PostgreSQL workloads and JWT httpOnly cookie authentication. The 37x JSON gap collapses to 1.8x on authenticated queries, auth itself costs about 10%, and tail latency reorders the leaderboard completely.
Streaming Agents with Pydantic AI over Typed WebSockets: Tools, Approvals, and a Generated Client
Building a production-style AI agent server with Pydantic AI + FastAPI + chanx: streaming structured output and human-in-the-loop tool approvals over a typed WebSocket contract, background runs broadcast to conversation groups (multi-tab, refresh-proof, approve from any device), AsyncAPI-generated TypeScript clients, and offline tests without an LLM.
Stop Reaching for APIView: Picking the Right DRF View Class
An in-depth take on DRF API design: when to reach for ModelViewSet, GenericViewSet with mixins, the concrete generic views, or plain APIView, and why the serializer is what makes the choice pay off.
Schema-First API Development with DRF + React: OpenAPI as the Contract
How my team ships DRF + React features without ever hitting a mistyped param or outdated API call: drf-spectacular as the source of truth, generated zod clients, auto-generated forms, and strict typing on both sides.
nplus1: A Modern N+1 Query Detector for Django, SQLAlchemy, and Peewee
A maintained, improved successor to nplusone — no more false positives on nullable foreign keys, stack traces in every detection, batch reporting, and full strict typing.
copit: Copy Source Code Into Your Project, shadcn/ui Style
A CLI that copies source code from GitHub repos, URLs, and ZIP archives directly into your project — tracked, updatable, and fully yours. A Rust binary installable via pip.
django-i18n-fields: Multilingual Model Fields for Django
Database-agnostic localized model fields built on Django's JSONField — with DRF serializers, strict type checking, and a clean admin UI. An alternative to django-localized-fields and django-modeltranslation.
Python API Framework Benchmark: FastAPI vs Django vs Litestar on Real Database Workloads
I benchmarked the major Python web frameworks against real PostgreSQL workloads. The 20x performance gap you see in JSON benchmarks collapses to 1.3x once the database gets involved.
DRF Auth Kit: A Complete Authentication Solution for Django REST Framework
Modern DRF authentication with JWT cookies, 50+ social login providers, MFA, full type safety, and OpenAPI schemas that are actually correct — no manual fixes required.
ChanX: Structured, Type-Safe WebSockets for Django and FastAPI
A batteries-included WebSocket framework: automatic message routing with Pydantic, mypy/pyright type safety, auto-generated AsyncAPI docs, and testing utilities — one codebase for Django Channels and FastAPI.
fast-channels: Django Channels for FastAPI
Bringing Django Channels' battle-tested consumer patterns and channel layers to FastAPI, Starlette, and any ASGI framework — group messaging, background workers, and cross-process communication included.