Home

Blog

Posts tagged with: #Security

How to Protect Your FastAPI OpenAPI/Swagger Docs with Authentication

October 25, 2025

Read More...

A Practical Guide to FastAPI Security

October 24, 2025

A Practical Guide to FastAPI Security

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

How to Handle File Uploads in FastAPI

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

How to Create and Secure PDFs in Python with FastAPI

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...

A Guide to Authentication in FastAPI with JWT

September 21, 2025

A Guide to Authentication in FastAPI with JWT

From Basic Auth to OAuth2 with Password Flow and JWT Tokens.

Learn to secure your FastAPI API. This guide covers password hashing, OAuth2 password flow, and using JWT for a robust, production-ready authentication system.

Read More...

Secure FastAPI Environment Variables on Cloud Run with Secret Manager

September 3, 2025

Secure FastAPI Environment Variables on Cloud Run with Secret Manager

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

6 Essential FastAPI Middlewares for Production-Ready Apps

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

Adding Google Authentication to Your FastAPI Application

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.

© 2025 David Muraya. All rights reserved.