PyCon DE & PyData 2026 — April 14, 11:45, Dynamicum [Ground Floor] 90-minute hands-on tutorial by Mehdi Ouazza and Dumky de Wilde
workshop/ <-- START HERE
├── duckoffee.duckdb # Dataset: a coffee-shop chain across 13 cities
├── skill.md # Agent instructions (semantic layer)
├── pyproject.toml # Python deps: duckdb, pydantic-ai, fastmcp, openai
├── Makefile # make setup
└── (your code) # agent_loop.py, agent_tools.py, mcp-server/, …
solutions/ # Reference implementations for every part
site/ # Slide deck (Next.js → GitHub Pages)
└── src/content/*.mdx # One MDX file per part
.devcontainer/ # Codespace / devcontainer (Python, uv, opencode)
All exercises happen inside workshop/. Clone the repo, cd workshop, and follow the slides.
git clone https://github.com/motherduckdb/analytics-agent-duckdb-workshop.git
cd analytics-agent-duckdb-workshop/workshopYou need Python 3.10+, uv, and opencode:
# uv (fast Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
# opencode (agentic CLI)
curl -fsSL https://opencode.ai/install | bash
# workshop Python deps
uv syncPick one:
| Option | How |
|---|---|
| MotherDuck-minted key (recommended) | Go to motherduck.com/minter — pre-funded, no signup hassle |
| Bring your own key | OpenRouter, Anthropic, or OpenAI — any provider that speaks the OpenAI chat API |
export OPENROUTER_API_KEY="sk-or-v1-..."python3 --version # 3.10+
uv --version
duckdb --version
opencode --versionDon't want to install Python/uv/opencode? Open the repo in a GitHub Codespace — everything is pre-installed, you just bring your key.
gh codespace create --repo motherduckdb/analytics-agent-duckdb-workshop| Part | Topic | Time |
|---|---|---|
| 1 | DuckDB from Python | 10 min |
| 2 | Text-to-SQL & the agentic loop | 15 min |
| 3 | Context: skill file + COMMENT ON | 15 min |
| 4 | Deterministic tools with PydanticAI | 20 min |
| 5 | Distribute via FastMCP | 15 min |
- Slides: motherduck.com/pyconde2026
- Model key: motherduck.com/minter
- DuckDB docs: duckdb.org/docs
- PydanticAI docs: docs.pydantic.dev/pydantic-ai
- FastMCP: github.com/jlowin/fastmcp
Workshop materials for PyCon DE & PyData 2026.