Training course · OpenAI Codex · Python Development

OpenAI Codex for Python Developers

Delegate development work with OpenAI Codex: CLI and cloud agent, AGENTS.md, sandboxing, approvals and team PR workflows.

Duration
2 days (14 hrs)
Format
Online or on-site
Language
German or English
Participants
open dates or exclusive for your team
Certificate
Certificate of attendance

Overview

“OpenAI Codex for Python Developers” is a hands-on course for roles such as Python back-end developers working with Django, Flask or FastAPI, Automation and scripting specialists in IT and business units and Data and ML engineers maintaining production Python code. Rather than learning OpenAI Codex in the abstract, you work on tasks from your daily routine – with examples, exercises and templates from Python Development.

OpenAI Codex is a coding agent that runs both locally, as a command-line tool and IDE extension, and as a cloud agent. Locally, Codex reads your repository, proposes changes and runs commands inside a sandboxed environment. In the cloud, it works on delegated tasks in parallel inside isolated containers and returns results as traceable diffs or pull requests. Over two days you will learn how to combine both modes effectively and how to scope tasks so that the agent can complete them reliably and with minimal back-and-forth.

Control and security sit at the heart of the course. With AGENTS.md you hand Codex project knowledge, build and test commands, and conventions. You configure approval modes and sandboxing so that the agent only does what you permit, and you set up cloud environments with suitable setup scripts. You will also integrate Codex into your pull request workflows, use automated code review, and define team rules on which tasks are delegated and how results are checked before they are merged into the main branch.

Python powers web back ends, automation, data pipelines and AI applications – often inside the same organisation, which makes codebases notoriously diverse. AI coding assistants and agents have a particularly visible impact here: they write pytest suites around your existing fixtures, add type hints until mypy passes cleanly, migrate legacy scripts to modern packaging with pyproject.toml and walk you through an unfamiliar Django or FastAPI project in minutes rather than days. The key is steering these tools with the right context: project conventions, Ruff rules, test commands and architectural decisions belong in instruction files and prompts. Once you master that, you can delegate routine work with confidence and focus on design, review and business logic.

The course is delivered live – either online in a virtual classroom or on-site in our training rooms in Munich, Salzburg, Berlin, Augsburg, Hanover, Bremen, Stuttgart and Kaiserslautern. We can also run it exclusively for your team.

Who is this course for?

  • Python back-end developers working with Django, Flask or FastAPI
  • Automation and scripting specialists in IT and business units
  • Data and ML engineers maintaining production Python code
  • Tech leads responsible for code quality and review processes
  • Developers modernising legacy Python codebases

Typical challenges we address

  • Ageing codebases with no type hints and patchy test coverage
  • Dependency sprawl across requirements.txt, Poetry, uv and virtual environments
  • Time-consuming reviews and inconsistent style despite linters and formatters
  • Onboarding into unfamiliar projects that rely on undocumented tribal knowledge

What you will be able to do

  • You use Codex locally and in the cloud for the development tasks each mode suits best.
  • You write an AGENTS.md that guides the agent reliably through your project.
  • You configure approval modes and sandboxing to match your security requirements.
  • You delegate tasks to the cloud agent and review the results systematically.
  • Have AI agents reliably deliver pytest suites, type hints and refactorings across your Python codebase.
  • Encode project conventions, tooling such as Ruff, mypy and uv, and test commands so the assistant follows them consistently.
  • Review generated Python code systematically for correctness, security and maintainability before it is merged.

Course outline

Day 1

Module 1 Codex at a glance: CLI, IDE and cloud
  • Comparing how Codex works locally and in the cloud
  • Installing the Codex CLI, signing in and starting it in a repository
  • Interactive sessions, non-interactive execution and model choice
  • Distinguishing tasks that suit a coding agent from those that do not
Module 2 Project knowledge with AGENTS.md
  • Building an AGENTS.md with build, test and lint commands
  • Stating conventions, architectural notes and prohibitions precisely
  • Using nested AGENTS.md files for monorepos and sub-projects
  • Checking effectiveness and refining instructions iteratively
Module 3 Sandboxing, approvals and security
  • Choosing approval modes deliberately, from read-only to largely autonomous
  • Understanding sandbox boundaries for file system and network access
  • Handling secrets, dependencies from the internet and prompt injection
  • Configuration files for team standards and safe defaults
Module 4 Delegating tasks to the cloud agent
  • Configuring cloud environments with setup scripts and dependencies
  • Writing tasks with a clear goal, context and acceptance criteria
  • Launching several tasks in parallel and comparing the results
  • Using logs and test output to understand the proposed solutions

Day 2

Module 5 PR workflows and code review in the team
  • Turning results into pull requests and requesting follow-up changes
  • Using automated Codex code review on GitHub
  • Embedding Codex in scripts and CI pipelines
  • Setting team rules for delegation, review duties and accountability
Module 6 Practice lab: Python Development
  • Generating pytest tests
  • Type hints and mypy clean-up
  • Django migrations and ORM refactoring
  • FastAPI endpoints with Pydantic
  • Modernising legacy scripts
  • Understanding and documenting a codebase
Module 7 Data protection, quality & transfer to daily work
  • Define which source code may be sent to cloud-hosted models, keep secrets from .env files strictly out of context, and check generated code for licence carry-over and newly introduced PyPI dependencies (typosquatting, supply-chain risk). For products with digital elements, obligations under the Cyber Resilience Act are becoming increasingly relevant.
  • Ground rules for safe AI use in your team
  • Checking results: facts, sources, tests and the four-eyes principle
  • Personal action plan for the next 30 days
  • Open questions, outlook and resources for further learning

Practical scenarios from your field

Generating pytest tests

The assistant inspects functions and existing fixtures, writes parametrised pytest tests covering edge cases and mocks for external services, then runs them iteratively until they pass and reach the coverage you are aiming for.

Type hints and mypy clean-up

Untyped code is annotated module by module with type hints, TypedDicts and Protocols. The agent runs mypy or Pyright, interprets the output and fixes issues step by step without changing runtime behaviour.

Django migrations and ORM refactoring

Model changes are planned together with data migrations, makemigrations conflicts are resolved and N+1 queries are fixed with select_related or prefetch_related. The AI flags risks to existing production data before you deploy.

FastAPI endpoints with Pydantic

From a functional description or an OpenAPI draft, the assistant produces Pydantic models, routers, dependency injection and validation logic, complete with error handling and matching tests using the TestClient.

Modernising legacy scripts

Old scripts become proper packages with pyproject.toml, global state is removed, argparse or Click interfaces are added and Ruff rules applied. The agent documents every change clearly in the commit history.

Understanding and documenting a codebase

The assistant explores an unfamiliar repository, produces architecture overviews, explains data flows between modules and fills in missing docstrings in Google or NumPy style so new team members become productive faster.

Possible hands-on projects

Log analysis CLI

A Typer-based command-line tool that reads application logs, clusters error patterns and outputs a concise summary as Markdown or JSON – shipped with tests and proper packaging.

FastAPI microservice with a database

A small REST service with SQLAlchemy, Alembic migrations, Pydantic validation and a Docker setup, planned, implemented and tested end to end by an AI agent.

Dependency audit script

A script that lists all project dependencies, checks for outdated or vulnerable packages against public advisory databases and produces a prioritised upgrade report.

Prerequisites

You have hands-on programming experience, are comfortable with Git and the command line, and know pull-request-based workflows. Solid Python skills plus hands-on experience with Git, virtual environments and at least one framework such as Django, Flask or FastAPI.

Technical requirements

Your own laptop with a terminal, Git and a Node.js runtime; a ChatGPT plan with Codex access or an OpenAI API key, plus a GitHub account for the cloud exercises.

Data protection & compliance

Define which source code may be sent to cloud-hosted models, keep secrets from .env files strictly out of context, and check generated code for licence carry-over and newly introduced PyPI dependencies (typosquatting, supply-chain risk). For products with digital elements, obligations under the Cyber Resilience Act are becoming increasingly relevant.

Suggested dates

All dates are suggestions – your preferred date is always possible.

  • Wed, 25 November 2026 – Thu, 26 November 2026 Online Request
  • Thu, 10 December 2026 – Fri, 11 December 2026 Bremen Request
  • Mon, 11 January 2027 – Tue, 12 January 2027 Online Request
  • Wed, 20 January 2027 – Thu, 21 January 2027 Salzburg Request
  • Tue, 2 February 2027 – Wed, 3 February 2027 Online Request
  • Mon, 8 February 2027 – Tue, 9 February 2027 Kaiserslautern Request

Frequently asked questions

When should I use Codex locally and when in the cloud?

Locally you work interactively and close to the code, for example when debugging or making exploratory changes where you want to follow every step. The cloud agent suits well-defined tasks that can run independently, such as adding tests or fixing smaller bugs. You can start several of these in parallel and review each one as a pull request.

What belongs in a good AGENTS.md?

A good AGENTS.md explains how the project is built, tested and checked, which conventions apply and which areas must not be touched. It is concise, concrete and kept up to date. Notes on architecture and common pitfalls also help. During the course you write an AGENTS.md for a project of your own and test how it changes the agent’s behaviour.

How safe is it to let Codex run commands?

By default Codex works inside a sandbox with restricted file and network access and asks for approval before risky steps. You decide how much autonomy to grant through approval modes and configuration. In the course you learn to choose these settings deliberately and to limit risks such as prompt injection or running unfamiliar dependencies.

Does AI-assisted coding work in large Django monoliths?

Yes, provided the agent gets the right context. On the course you learn to create instruction files describing architecture rules, app structure and test commands, and to scope tasks so the assistant works on individual apps or modules. Changes stay manageable and reviewable even when the overall project is very large.

Will AI replace my code reviews?

No. AI assistants speed up writing code and can prepare reviews by pointing out missing tests or risky sections, but functional and security accountability stays with your team. We show how to combine review checklists, static analysis and tests so that generated code meets exactly the same quality bar as hand-written code.

How much does “OpenAI Codex for Python Developers” cost?

The course costs a flat €949 plus VAT per participant – whether online or on-site. This includes 2 training day(s) with a live trainer, course materials, a lab environment and a certificate of attendance.

Can I suggest my own date?

Yes. Our suggested dates are just a guide. In the request form you can always describe your preferred date or period in free text – we check availability and confirm within one working day.

Is the course online or on-site?

Both are possible: live online in a virtual classroom or on-site in Munich, Salzburg, Berlin, Augsburg, Hanover, Bremen, Stuttgart or Kaiserslautern. We can also run the course exclusively for your team.

More courses for Python Developers

More OpenAI Codex courses

All 32 OpenAI Codex courses