Ollama Python SDK

Fully offline

Official Python SDK for Ollama. Async, streaming, typed — the right primitive for scripts.

Editorial verdict: “Foundational primitive for Python scripts against Ollama. Official, maintained, typed.

SDK / proxy
Free
MIT
4.5 / 5
GitHub ★ 5,500

Compatibility at a glance

Which runtime + OS combos this app works against. Source of truth for "will it run on my setup?"

§ Runtimes supported
ollama
§ OS / platform
linuxmacoswindows

What it is

The official Python SDK for Ollama. Async + sync, streaming, typed responses. Foundation for writing scripts and small services against a local Ollama server. Maintained by the Ollama team — keeps up with new features (vision, tools, embeddings) as they ship.

✓ Strengths

  • +Official + maintained by Ollama team
  • +Async + sync + streaming all work
  • +Typed responses

△ Caveats

  • Ollama-specific (use LiteLLM for multi-backend)
  • No batch endpoint helpers