Python Developers:
Build Smarter
with AI Agents
From rusty Python fundamentals to shipping real projects with Claude Code — a complete self-paced course built for developers who want to work with AI, not around it.
What you'll learn
This course is designed for Python developers whose skills may be a bit rusty — and who are ready to pair a refreshed foundation with modern AI-assisted development. You don't need to be an expert. You just need curiosity and a terminal.
Course Structure
The course is split into four modules. Start with a Python fundamentals refresher, then dive into agentic coding. Each module ends with a quiz to lock in what you've learned.
Functions Deep Dive
Everything you need to write clean, reusable Python functions — from basics to advanced patterns.
Functions are the fundamental unit of reusability in Python. If you want to write code that's maintainable — and that AI agents can work with effectively — you need to understand functions deeply, not just superficially.
The Anatomy of a Function
Let's start from first principles. A function takes inputs, does something, and returns an output. Here's the simplest possible form:
Default Parameter Values
You can give parameters default values. When the caller doesn't provide that argument, the default is used automatically.
*args and **kwargs
Sometimes you don't know ahead of time how many arguments a function will receive. Python gives you two powerful tools for this.
Type Hints
Python is dynamically typed — but you can (and should) add type hints. They don't enforce anything at runtime, but they make your code readable, and AI agents like Claude Code use them to generate better suggestions.
Functions as First-Class Objects
In Python, functions are objects. You can pass them as arguments, store them in variables, and return them from other functions. This is a key concept for writing flexible, powerful code.
Functions Quiz
Four questions to check your understanding of Python functions. Select an answer to see instant feedback.
OOP: Classes & Objects
Object-Oriented Programming from scratch. Build your first class, understand self, and see why OOP makes code easier to maintain and extend.
If you've never done OOP before, here's the core idea: instead of writing separate variables and functions, you bundle related data (attributes) and behaviour (methods) together inside a class. A class is a blueprint. An object is a specific thing built from that blueprint.
Your First Class
Understanding `self`
self is the first parameter of every method and refers to the specific instance the method is called on. When you call rex.learn_trick("sit"), Python automatically passes rex as self. You don't pass it yourself — Python handles it.
Class vs Instance Attributes
User class method to the Database class by mistake. Well-structured OOP code is readable by both humans and AI agents.OOP: Inheritance
Build on existing classes, extend behaviour, and avoid repeating yourself — the most powerful OOP concept.
Inheritance lets you create a new class that builds on an existing one. The new class (child) gets all the attributes and methods of the existing class (parent), and can add new ones or override existing ones.
Basic Inheritance
A Practical Example: AI Tool Hierarchy
Let's see inheritance in action with something relevant to what we'll build — a hierarchy of AI tool classes.
super().__init__() in a child class. If you override __init__, always call super().__init__(...) first — otherwise the parent class's initialization code never runs, and your object will be missing attributes.OOP Quiz
Test your understanding of Python classes and inheritance.
What Is Agentic Coding?
The difference between chat-based AI and a true coding agent — and why it changes everything.
You've probably used ChatGPT or Claude in a browser to get code suggestions. You paste your function, ask a question, copy the answer back into your editor, run it, hit an error, paste that error back in... and so on.
That workflow has a name: copy-paste development. And it has a fundamental limitation: the AI can't see your project. It only sees what you paste into the chat window.
How Claude Code Works
Claude Code is a command-line tool that you install once and run from your project directory. When you describe a task, it:
- Reads your files — the entire project structure, not just what you paste
- Makes changes — directly edits source files, creates new ones, refactors across multiple files
- Runs commands — executes your tests, sees the failures, fixes the code
- Manages git — creates commits, opens PRs, with as much or as little autonomy as you allow
Setting Up Claude Code
Permission Modes
You control how much autonomy Claude Code has. By default, it asks for approval before writing files or running commands. You can allow it to proceed automatically — useful for trusted workflows — or keep it in "ask every time" mode when you're learning or working on sensitive code.
Your First Project
Scaffold a complete Python project from a single prompt. From empty directory to running code in minutes.
Enough theory. Let's build something. You'll start with an empty directory and end with a running Python project — scaffolded entirely by Claude Code from one prompt.
Step 1: Create the project directory
Step 2: Write your scaffolding prompt
The key skill here is writing a precise, structured prompt. Don't just say "make a note app". Describe the architecture you want.
Step 3: Run it
Step 4: Push to GitHub
Agentic Coding Quiz
Check your understanding of Claude Code and agentic workflows.
Prompting Patterns That Work
The difference between prompts that produce great code and prompts that waste your time.
Prompting is a skill. Good prompts produce focused, correct, reviewable code. Vague prompts produce sprawling, hard-to-verify output. Here are the patterns that consistently work.
Pattern 1: Feature-First, Then Plan
Don't start with "write me a function that...". Start by describing the feature goal, then let Claude Code create a plan before writing any code.
Pattern 2: Constrain the Scope
The more constraints you give, the more predictable the output. Unconstrained prompts invite the agent to make assumptions you won't like.
Pattern 3: Verify Before Commit
Always ask Claude Code to run tests before committing changes. This is the workflow that prevents AI-generated bugs from entering your codebase quietly.
Pattern 4: Describe Intent, Not Implementation
Tell the agent what you want to achieve, not how to achieve it. Let it choose implementation details — that's what it's good at.
Reviewing AI-Generated Code
How to read, verify, and trust code you didn't write — without anxiety.
One of the most common concerns developers have about AI-generated code: "I'm accepting code I don't fully understand. What if it breaks something?" Here's a structured approach to reviewing AI code with confidence.
The Four-Question Review
For every significant piece of AI-generated code, ask these four questions:
Using Git as Your Safety Net
git diff and check for changes outside the files you specified in your prompt.Ask Claude Code to Explain Itself
If you don't understand a piece of generated code, just ask. Claude Code can explain any part of the code it wrote — including why it made specific choices.
Best Practices Quiz
Prompting and code review — apply what you've learned.
Build a CLI Tool
Put it all together. Build a feature-complete CLI application using Claude Code, OOP architecture, and proper tests.
This is the capstone lab. You'll extend the note-keeper project from Module 2 into a fully-featured CLI tool. Each feature uses the prompting patterns from Module 3, and the OOP knowledge from Module 1.
Feature 1: Tagging System
Add support for tagging notes. Notes can have multiple tags, and you can filter by tag.
Feature 2: Persistence
Notes disappear when the script ends. Fix that with JSON file persistence.
Feature 3: Rich Terminal Output
Final Step: Ship It
Debugging with AI
A systematic workflow for finding and fixing bugs in AI-generated code — without starting from scratch.
AI-generated code always has bugs. Not sometimes — always. The question isn't whether there are bugs, it's whether you have a system to find and fix them. Here's that system.
Step 1: Reproduce the Bug
Before involving Claude Code, reproduce the bug yourself. Know exactly what input causes it and what the wrong output is. Without this, you're asking the agent to guess.
Step 2: Investigate, Don't Just Fix
Ask Claude Code to find the root cause before it writes any fix. If you skip this step, it may patch the symptom and leave the actual bug in place.
Step 3: Fix with Tests
Step 4: Log for Next Time
You Did It.
You've gone from rusty Python to shipping real projects with an AI agent. Here's what you've accomplished.
What to Build Next
The workflow you have now applies to any Python project. Some ideas to practice with:
- A habit tracker CLI — extend your note-keeper with streak tracking and a daily review command
- A local file search tool — use Python's pathlib and Claude Code to build a ripgrep-style searcher
- A webhook listener — build a FastAPI endpoint that receives GitHub webhooks and posts to Slack
- Claude Code skills — turn your best prompts into reusable
/commitand/featureslash commands
Going Deeper
- MCP Servers — connect Claude Code to external APIs like GitHub, Linear, and databases
- Headless Mode — run Claude Code in CI pipelines without an interactive terminal
- Hooks — automate pre/post actions like running linters before every commit