Posts

Build Your Own Coding Agent in Python — A Beginner's Step-by-Step Guide (Every Step Explained)

Image
An AI agent is a program that thinks with an AI model and acts through tools. In this beginner-friendly build, you will write one small Python program — a coding agent — hand it a real failing test, and watch it find the bug, propose the exact fix, and then stop and wait for your permission before it changes anything. By the end, a test suite that starts at 1 failed, 3 passed ends at 4 passed , and the whole run costs less than one cent. Every step is explained in plain words, with a screenshot — no experience with agents is assumed. This is the beginner-first edition of our coding-agent build. If you already know what an agent is and want the denser reference version, read the original build instead: Build Your Own Coding Agent in Python (It Fixes Real Code — Behind an Approval Gate) . This post covers the same machine more slowly, and adds the two things beginners asked for: what every part means , and what to do when it breaks. What you need (versions used in this post) ...

Dockerize a FastAPI App: Dockerfile to Running Container

Image
Dockerize a FastAPI App: Dockerfile to Running Container "It works on my machine." Every developer has said it — usually right before the same app breaks on a server, because something there is different: another Python version, a library missing, a file that never got copied. Docker ends that argument. You pack the app together with everything it needs into one box — an image — and the box runs the same everywhere. In this post we dockerize a FastAPI app — from a plain Dockerfile to a running container — then pack it properly : the careless first try weighs 1.65 GB ; the proper pack weighs 198 MB . Same app. Smaller box. Get the code: all files from this post are free in the companion repo — topic-14-docker-fastapi folder The map Four stops, and everything below is one of them: The recipe — a Dockerfile : a short text file that describes the box. The packed box — Docker reads the recipe and builds an image : your app, frozen together with Python and every lib...

CI/CD for a FastAPI App — GitHub Actions to Azure App Service

Image
CI/CD for a FastAPI App — GitHub Actions to Azure App Service Direct answer: Put one workflow file in .github/workflows/ . Run your tests on every pull_request , and deploy to Azure App Service only on a push to main , after the tests pass, logging in with OIDC so no Azure password is ever stored in GitHub. That is the whole pipeline — this post builds it step by step. Versions used (November 2026): Python 3.12.3, FastAPI 0.115.6, pytest 8.3.4, actions/checkout@v4, actions/setup-python@v5, azure/login@v2, azure/webapps-deploy@v3. What you will build Two jobs, one gate between them. The test job runs on every pull request and holds no secrets. The deploy job runs only when code lands on main and only after the test job passes. Environment setup (prerequisites first) A GitHub account and a repository for the app (public or private — the pipeline is identical). An Azure account. The free account includes an F1 Free App Service plan; the spending limit stays ON. Creating the ac...