Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Ollama App Developer Bootcamp: Local AI Apps in Python
New

Ollama App Developer Bootcamp: Local AI Apps in Python

Build local AI apps in Python with Ollama: streaming, structured outputs, tool calling, RAG, UIs, FastAPI, tests, Docker
Created byNEXUS ACADEMY
Last updated 11/2026
English

What you'll learn

  • Call the Ollama REST API from Python with httpx and read streamed NDJSON responses and timing fields
  • Use the official ollama Python library for chat, streaming, conversation memory, async requests and model management
  • Choose, configure and pin a local model with sampling options, num_ctx and a custom Modelfile
  • Reuse existing OpenAI SDK code against the local /v1 endpoint and know its limits
  • Get validated structured output from a local model with JSON schema, Pydantic and retries
  • Build a guarded tool-calling loop with least-privilege tools and argument validation
  • Build a local RAG pipeline with embeddings, sqlite-vec, source citations and a golden-set baseline
  • Create streaming chat interfaces in Streamlit and Gradio, and a FastAPI backend with Server-Sent Events
  • Test LLM code with pytest, log latency and token counts, and apply practical prompt-injection defences
  • Package the app with Docker and docker compose and ship a complete local document assistant

Course content

15 sections • 119 lectures • 11h 50m total length
  • Course Documents and How to Use Them7:08
  • Section 1 Intro: From "Chatting With a Model" to Shipping an App2:59
  • What Ollama Is: A Local Model Server With an HTTP API6:08
  • Local Model vs Cloud API: What You Gain and What You Give Up6:06
  • The Course Repo: oad-app, Grown One Lecture at a Time5:14
  • [LAB] Running Ollama From the Official Docker Image, CPU Only7:39
  • [LAB] Pulling Small Models and Reading ollama list and ollama show7:03
  • [LAB] First Requests With curl: /api/chat and /api/generate6:51
  • [LAB] Project Setup: Python venv, Pinned Versions and a .env File7:06
  • Section 1 Wrap: A Running Server, Two Models and an Empty Repo3:02

Requirements

  • Basic Python: functions, virtual environments, pip and a little HTTP. No machine-learning background is needed.
  • A computer that can run Docker. A GPU is not required; every lab in the course runs on CPU.

Description

“This course contains the use of artificial intelligence.”

Most Ollama tutorials stop at chatting with a model in the terminal. This bootcamp starts there and keeps going until you have shipped a real application: a local document assistant written in plain Python that keeps your data on your own machine.

Every lab runs for real on a CPU-only bench built from the official Ollama Docker image and small open models. Every model answer on screen is the model's actual output, including the times a small model gets it wrong, because seeing a failure and adding the guard that catches it is the lesson. Latency and token numbers are measured live from the response fields on that bench, never quoted from a brochure.

You will start with the raw REST API using httpx, so you understand the request, the NDJSON stream and the timing fields before any library hides them. Then you move to the official ollama Python library: chat and generate, streaming, conversation memory, the async client and model management from code.

Next you treat the model as a dependency. You compare models by size, capabilities and licence, tune sampling options, test reproducibility with seed and temperature, measure what num_ctx really does, build a custom model with a Modelfile, and read thinking output from Python. You also point the openai SDK at the local /v1 endpoint and learn exactly what it does and does not support.

The application half of the course covers the features real apps need: JSON schema structured outputs with Pydantic validation and retries, tool calling with a guarded agent loop and allow-listed arguments, embeddings and vector search with sqlite-vec, a complete RAG pipeline with source citations and a small golden set to measure retrieval, and an optional vision feature with an honest look at its cost on CPU.

Finally you put a face on it and ship it: a streaming chat UI in Streamlit with SQLite history, the same chat in Gradio, a FastAPI service with Server-Sent Events, pytest suites with a mocked client and golden-set tests, latency logging, practical prompt-injection defences, and a Dockerfile plus docker compose setup that goes from a clean clone to a running app in one command.

The capstone brings everything together in one repository, oad-app, which grows lecture by lecture. Eleven downloadable Word guides and checklists support the labs, from bench setup to a release runbook.

This course focuses on building applications. Server hardening, Kubernetes and vLLM, and agent frameworks such as LangChain or LangGraph are outside its scope.

Who this course is for:

  • Python developers who want to add AI features to their apps while keeping data on their own machine
  • Data and automation engineers who want to build practical local LLM tools instead of calling a cloud API
  • Developers who have tried Ollama in the terminal and want to turn it into a tested, shippable application