Workshops: Agentic Coding by Tech Stack
Agentic Coding for Python: Django & FastAPI Workshop
Python's flexibility lets coding agents produce working code fast, and just as fast produce untyped helpers, untested endpoints and migrations that drop a column in production. This workshop shows Django and FastAPI teams how to turn type checking, pytest and migration discipline into guardrails, so Claude Code, OpenAI Codex, GitHub Copilot or Cursor deliver backend code you can maintain.
Who is this workshop for?
- Python backend developers working with Django, Django REST Framework or FastAPI
- Tech leads introducing type hints and static checks into an existing codebase
- Teams with growing test gaps in Python services
- Developers of data-heavy applications with many database migrations
- Data and platform teams exposing models or pipelines through Python APIs
What you will take away
- Configure ruff, mypy or pyright and pytest so the agent gets immediate, precise feedback on every change.
- Have agents add type hints and Pydantic models to existing code incrementally without changing behaviour.
- Generate meaningful pytest suites with fixtures and factories instead of brittle tests that mirror the implementation.
- Let agents create and review Django or Alembic migrations, including data migrations, with clear rules for destructive changes.
- Spot typical agent mistakes in Python backends such as N+1 queries, blocking calls in async endpoints and swallowed exceptions.
Agenda
Module 1
Making Python projects agent-ready
- Project context: virtual environments, uv or Poetry, permitted commands
- Claude Code, OpenAI Codex, GitHub Copilot and Cursor in Python repositories
- Exercise: let the agent explain the request lifecycle of one endpoint
Module 2
Typing as a guardrail
- Gradual typing with mypy or pyright and a baseline for legacy modules
- Pydantic models and Django serializers as contracts
- Ruff for linting and formatting inside the agent loop
Module 3
Tests that agents write and run
- Exercise: a pytest suite for an existing endpoint with fixtures and factories
- Test databases, pytest-django and FastAPI's test client
- Reviewing generated tests for real assertions
Module 4
Migrations and data
- Django migrations and Alembic: generate, read, then apply
- Data migrations, reversibility and zero-downtime patterns
- Query performance: select_related, prefetch_related and async database access
Module 5
Async, upgrades and review
- Async views and endpoints without hidden blocking calls
- Python and Django upgrades with deprecation warnings as a to-do list
- A review checklist for agent-written Python backend code
Why typing matters more with agents
In an untyped Python codebase, the agent often has to guess what a function returns or which keys a dictionary contains. A type checker turns those guesses into errors the agent can see and fix in the same session. Even partial typing of the most important modules noticeably improves generated code.
We show how to introduce typing step by step, with a baseline so the existing code does not drown the agent in hundreds of old warnings.
Rules for migrations
Migrations are where an agent's mistake reaches real data. We recommend a few non-negotiable rules that you anchor in your agent configuration and CI.
- Agents generate migrations; humans review and apply them
- Migrations that have already run anywhere are never edited
- Destructive changes split into expand and contract steps
- No production data in prompts; synthetic fixtures for tests, also with GDPR in mind
Django or FastAPI?
The workshop covers both and weights them according to your stack. Django teams benefit most from conventions around the ORM, the admin and migrations; FastAPI teams from Pydantic contracts, dependency injection and async patterns. Mixed landscapes are common and welcome. Led by neooutput AI Code Engineers, remotely or on-site.
Frequently asked questions
Is this also useful for Flask or other frameworks?
Largely, yes. Typing, pytest and review practices apply to any Python backend. We align framework-specific exercises with your stack after a short preparatory call.
Can agents write tests for code that has none?
Yes, and it is often the best first use case. Agents write characterisation tests that pin down current behaviour before anyone refactors. Your team then checks that those tests assert what really matters.
Do our developers need to know typing already?
No. Solid Python basics are enough. We introduce type hints, type checkers and Pydantic within the exercises, so the team learns them together with the agent workflow.
Workshop
Get in touch
Want your Python backend to grow faster without getting harder to maintain?
Tell us roughly how many people will join and pick dates that work – we will get back to you within 24 hours with a proposal for content, format and schedule.
Prefer to talk first?
15 minutes, free and without obligation – with our AI Trainers and AI Code Engineers.
Book a call for free (opens in new tab) +49 761 519 751 50 (24/7)Request a training / workshop
Workshop: Agentic Coding for Python: Django & FastAPI Workshop · 1 day
More workshops
- Workshops: Agentic Coding by Tech StackAgentic Coding with Java & Spring Boot: Enterprise Workshop
- Workshops: Agentic Coding by Tech StackAgentic Coding for .NET & C#: Workshop for Dev Teams
- Workshops: Agentic Coding by Tech StackAgentic Coding with Go: Workshop for Idiomatic Go Services
- Workshops: Agentic Coding by Tech StackAgentic Coding with Rust: Advanced Workshop
- Workshops: Agentic Coding by Tech StackAgentic Coding with PHP, Laravel & Symfony: Workshop
- Workshops: Agentic Coding Tools in DepthGemini CLI, Jules & Gemini Code Assist: Workshop for Dev Teams
