Tag

#Python

Every article tagged Python, in one place.

  • 38 articles
  • 147 min of reading
  • 02 Dec, 2026 last updated

Showing 38 articles

Running LLMs LocallyNew 4 min read

Streaming Responses from the Ollama API

By default, Ollama streams its answer: instead of one big response it sends many small JSON objects, one per chunk of generated text, so users see words appear immediately. This post explains the format and shows how to read it in curl and Python. Why stream?...

20 Nov, 2026 Jai Singh 21 0
Read article
RAG & Vector SearchNew 4 min read

Fixed-Size Chunking with Overlap in Python

Fixed-size chunking cuts text into pieces of roughly equal length, with a little overlap between neighbours. It is the simplest strategy, it is easy to reason about, and for uniform plain text it is often good enough. This post builds one in Python, explains i...

20 Nov, 2026 Jai Singh 13 0
Read article
Model Context Protocol 4 min read

Build Your First MCP Server in Python with FastMCP

The official MCP Python SDK includes a high-level class called FastMCP that turns ordinary Python functions into MCP tools with a decorator. In this tutorial you will install the SDK, write a small server with two tools, run it and test it with the MCP Inspect...

03 Nov, 2026 Jai Singh 23 0
Read article
LLM APIs & Prompting 3 min read

Anatomy of a Messages API Request

A Messages API request has three required fields: model , max_tokens and messages . Everything else is optional tuning. Knowing what each field does helps you debug unexpected output, control cost and avoid 400 errors. The full picture import anthropic client...

26 Oct, 2026 Jai Singh 25 0
Read article
LLM APIs & Prompting 3 min read

Your First Claude API Call in Python

To call Claude from Python, install the anthropic package, put your API key in the ANTHROPIC_API_KEY environment variable, and call client.messages.create() with a model, a token limit and a list of messages. This post takes you from an empty folder to a worki...

18 Oct, 2026 Jai Singh 36 0
Read article