← Back to the full program
Optional · Prerequisite module

Python Refresher for Agentic Development

The 40-hour Agentic AI Engineering program assumes working Python — but "working Python" covers a lot of ground. This module starts from the language basics and carries you all the way to the exact patterns your first agent call will use: typed data, async API calls, and tool-calling schemas. Whether you're properly new to Python or just rusty, start at Block A and work forward; if you're already fluent, skip ahead using the checklist below. Before Weekend 1, not instead of it.

10
Hours, self-paced
5
Blocks, basics → advanced
1
Live Q&A (optional)
5
Hands-on exercises
🐍
BLOCK A · BASICS

Python Fundamentals

Variables, data types, control flow, strings, and the core collections — no prior Python assumed.

🏗️
BLOCK B · CORE

Functions, OOP & Clean Code

Functions, classes, error handling, decorators & context managers — how real Python projects are structured.

📦
BLOCK C · CORE

Environments & Data Modeling

Virtual envs & dependency management, type hints, dataclasses, Pydantic models, JSON.

BLOCK D · ADVANCED

Async Python & APIs

async/await, asyncio, calling REST APIs, parsing responses — the shape every agent tool call takes.

🔧
BLOCK E · ADVANCED

Agentic-Ready Patterns

Tool-calling schemas, structured output, logging & a first look at testing — the bridge into Session 01.

Skip ahead if you can already —

Write scripts using variables, loops, and Python's core data types confidently
Write and import your own Python modules and packages
Use classes, decorators, and context managers comfortably
Set up a virtual environment and manage dependencies
Define and use type hints, dataclasses, or Pydantic models
Make an HTTP request (sync or async) and parse a JSON response
Explain the difference between synchronous and async code
Describe what a "function-calling" or tool schema is

New to Python, or checked 2 or fewer? Start at Block A and work straight through. Checked most of these? Skim Blocks A–C and spend your time on D and E — that's where the agentic-specific patterns live.

Python 3.11+ venv / uv typing / dataclasses Pydantic asyncio httpx / requests pytest logging
Detailed breakdown

Five blocks, basics to agentic-ready

Work through the blocks in order, at your own pace, any time before Weekend 1. Blocks A–C build general Python fluency; D and E are where the language starts looking like the code you'll write in the main program.

Block ABasics~2h

Python Fundamentals

Start here if Python is new to you, or it's been years. No frameworks, no APIs — just how the language itself stores data and expresses logic, so everything after this block has somewhere to land.

Topics: Variables & dynamic typing · core data types (int, float, str, bool, None) · operators & expressions · control flow (if/elif/else, for, while) · strings & f-strings · lists, tuples, dicts & sets · list/dict/set comprehensions · basic input & output

Exercise Write a script that reads a list of plain-Python records, filters and reshapes them with comprehensions, and prints a formatted summary.
Block BCore~2.5h

Functions, OOP & Clean Code

Agent code is organized as small, composable functions and classes — tools, nodes, handlers. This block is where you get fluent writing code that other code (and other developers) can call.

Topics: Functions — positional/keyword args, defaults, *args/**kwargs · lambdas & first-class functions · scope & closures · classes — attributes, methods, inheritance, dunder methods · modules, packages & imports · exceptions — try/except/finally, raising & custom exceptions · decorators · context managers (with)

Exercise Refactor a procedural script into small, composable functions and a class with a custom context manager and a custom exception.
Block CCore~2h

Environments, Typing & Data Modeling

Every agent framework leans on structured, validated data — tool schemas, retrieved documents, model responses. This is where Python stops being "just scripts" and starts looking like production code.

Topics: Virtual environments & dependency management (venv, uv, pip) · project structure & imports · type hints, from basics to generics · dataclasses vs. Pydantic models · reading, validating & serializing JSON · environment variables & config (.env)

Exercise Model a small nested JSON payload as a Pydantic schema, validate a batch of sample records, and surface validation errors clearly.
Block DAdvanced~2h

Async Python & Working with APIs

Every call to an LLM, a tool, or a retriever is an HTTP request under the hood — usually an async one. This block is the exact mechanics your first agent call will use.

Topics: Sync vs. async execution · async / await & the event loop · asyncio.gather for concurrent calls · calling REST APIs with httpx / requests · timeouts, retries & basic error handling · streaming responses

Exercise Build a small CLI that calls a public REST API concurrently for several inputs, validates each response with a Pydantic model, and prints a clean summary.
Block EAdvanced~1.5h

Agentic-Ready Patterns

The bridge block. Everything above, combined into the exact shape of a real agent call — so Session 01 of the main program feels like a continuation, not a cold start.

Topics: Anatomy of an LLM / chat-completion API call (messages, roles, parameters) · describing a Python function as a function/tool-calling schema · parsing structured/JSON output from a model response · basic logging for debugging a multi-step call · a first look at automated testing (pytest) for checking agent behavior

Mini Lab Write a Python function, describe it as a tool-calling schema, mock a model response that "calls" it, then execute and log the result — the exact loop every agent framework repeats internally.