A Practical Guide to FastAPI Security
October 24, 2025

A Comprehensive Checklist for Production-Ready Security for a FastAPI Application
Secure your FastAPI app with a complete checklist. Covers XSS, SQL Injection, rate limiting, secure headers, authorization, logging, and protecting API docs.
Read More...
How to Handle File Uploads in FastAPI
October 20, 2025

A Practical Guide to Streaming and Validating File Uploads
Build robust file upload endpoints in FastAPI. Learn to stream large files to disk, validate size and MIME type, and handle security to prevent common pitfalls.
Read More...
How to Create and Secure PDFs in Python with FastAPI
October 11, 2025

A Guide to Generating and Encrypting PDFs with WeasyPrint, pypdf, and FastAPI
Learn to generate dynamic PDFs from HTML templates using WeasyPrint, secure them with pypdf, and serve them with FastAPI. This guide covers password encryption, permissions, and streaming responses for production use.
Read More...
Secure FastAPI Environment Variables on Cloud Run with Secret Manager
September 3, 2025

A Step-by-Step Guide to Managing Production Secrets on Google Cloud.
Learn how to secure your FastAPI application on Google Cloud Run by managing secrets like API keys and database passwords with Google Secret Manager. This guide covers setup, permissions, and CI/CD integration.
Read More...
6 Essential FastAPI Middlewares for Production-Ready Apps
February 4, 2025

A guide to the 6 key middlewares for building secure, performant, and resilient FastAPI applications.
Learn how to build a production-ready FastAPI applications by implementing 6 essential middlewares. This guide covers security headers, CORS, trusted hosts, Gzip compression, process time tracking, and custom exception handling, including why their order is critical.
Read More...
Adding Google Authentication to Your FastAPI Application
January 27, 2025

A guide to adding Google Authentication to your FastAPI app.
Learn how to add Google Authentication to your FastAPI app, making it easier to use and more secure.
Read More...
Contact Me
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.