type-hints

Adding type hints to Python code for clearer APIs and better tooling support.

Build an MCP Server in Python (FastMCP, Step by Step)

Write a useful function once and every AI assistant should be able to call it: Claude Desktop, your editor, your own agent loop. That is exactly what you get when you build MCP server tooling around code you already trust. In this workshop we wrap the access-log parser and the bookmark Application Programming Interface (API) from earlier posts into one FastMCP server with three tools, a resource, and a prompt, all offline. “Write the tool once, then let every assistant ... Read More

Python Chatbot Project: Multi-Provider Chat App with Costs

One day a provider changes its API and half the chat tutorials on the internet quietly break. This Python chatbot project is built to survive that: a command line app that talks to any provider through one adapter layer, remembers the conversation, streams the reply as it arrives, returns typed data with Pydantic, and prints exactly what each turn cost. “Program to an interface, not an implementation.” Gang of Four, Design Patterns Last Updated: July 2026 | Tested on: Python ... Read More

Python Interview Questions: The 40 That Actually Get Asked

Most Python interview questions in a phone screen come from the same list of roughly forty fundamentals, reworded slightly from company to company. This post is that list: five groups covering the data model, functions, OOP, concurrency, and tooling, each with a spoken answer, code tested on Python 3.14.6, and a link to its deep-dive lesson. Score yourself at the end and build a revisit list from your misses. “Programs must be written for people to read, and only incidentally ... Read More