Running Database Migrations with Alembic in Google Cloud Build
June 30, 2025
How to Organize and Load FastAPI Settings from a .env File Using Pydantic v2
Learn how to centralize your FastAPI configuration using Pydantic Settings and a .env file. This post covers setup, usage, and best practices for managing environment variables and secrets in a maintainable way.
Read More...
Connecting FastAPI to a Serverless Database with pool_pre_ping
June 10, 2025
How to Keep FastAPI Connected to Serverless Databases Like Neon
Learn how to keep your FastAPI app connected to serverless databases like Neon, even when they scale down to zero. This post explains how to use SQLAlchemy's pool_pre_ping=True to automatically reconnect and avoid broken connections, with practical code examples and .env setup.
Read More...
Full-Text Search: Using the Trigram Tokenizer Algorithm to Match Peoples Names
April 24, 2025
Leveraging Full Text Search and Trigram Tokenization for Efficient Name Matching
This article explains how to use SQLite's FTS5 module with the trigram tokenizer to perform efficient full-text searches, particularly for matching similar names in a large database. It covers setting up the virtual table, normalizing names, bulk inserting data, and executing searches that handle close but not exact matches
Read More...
Have a project in mind? Send me an email at hello@davidmuraya.com and let's bring your ideas to life. I am always available for exciting discussions.