Python Tutorial #23: Build a REST API — FastAPI

In the previous tutorial, we built a CLI tool with Click and Rich. Now let’s build a REST API — a web API that any frontend, mobile app, or other service can call. We will use FastAPI, the fastest-growing Python web framework. It has automatic documentation, type checking, and built-in validation. By the end of this tutorial, you will have a working Bookmark Manager API. Why FastAPI? Automatic API docs — Swagger UI at /docs (free, no setup) Type-safe — uses Python type hints for validation Fast — built on Starlette and Pydantic (one of the fastest Python frameworks) Async support — native async/await (from Tutorial #18) Pydantic validation — automatic input validation (from Tutorial #10) Install the dependencies: ...

May 1, 2026 · 8 min

Python Tutorial #20: Databases — SQLite and SQLAlchemy

In the previous tutorial, we learned about HTTP requests and APIs. Now let’s learn about databases — how to store, read, update, and delete data using Python. We will cover two approaches: Python’s built-in sqlite3 module (no installation needed) and SQLAlchemy (the most popular Python ORM). By the end of this tutorial, you will know how to build data-driven applications. What is SQLite? SQLite is a database that stores everything in a single file. It comes built into Python — no installation, no server, no configuration. It is perfect for: ...

April 30, 2026 · 8 min