Intermediate Python for Software Development
About this course
Python makes it easy to produce working code, and just as easy to produce code nobody wants to touch six months later. This course teaches the practices that hold up across a team and a codebase over years, in place of habits that only work for a single script.
Day One focuses on the language features that pay off in a larger codebase. Generators and iterators let you process data that will not fit in memory. Decorators let you attach behaviour such as caching or timing without editing the function underneath. Dataclasses and namedtuples replace the hand-written boilerplate most codebases accumulate. Type annotations get a section of their own. Annotations are the cheapest way to catch a whole class of mistake before the code runs, and they document a function in a form a checker can verify.
Day Two focuses on the toolchain teams rely on: Ruff for linting and formatting, uv for packaging and reproducible dependencies, pytest for tests, and Git used the way teams use it rather than as a backup mechanism. We spend time on the parts that only cause trouble once other people depend on the code. These include exception blocks that swallow the error you needed to see, logs that say nothing useful when something goes wrong, inputs that were never validated, and a project that builds on one machine and not another.
The course closes with an extended case study that carries a rough prototype through to a maintainable command-line tool. You work on the design and tests first, then the implementation, then the error handling, validation and configuration that make it something you would hand to someone else. Every topic mixes instruction with hands-on exercises, and the trainer works through them with you.
Bring your own project and we will work through it with you.
Who this course is for
Software engineers, analysts and scientists who already write Python and now have to maintain code that other people read, extend and depend on. The course suits developers moving from scripts to packages and services, and anyone who has inherited a Python project and needs to make it safe to change.
This course also suits teams standardising tooling and review practice across a codebase, where prototypes written by one person keep becoming production code that everyone else has to work in.
Prerequisites
This course is designed to be able to be completed immediately after completing Python Charmers' Introduction to Python course, or equivalent programming experience (approximately 3 months of regular usage).
You should be comfortable with functions, lists, dictionaries, loops and importing from the standard library. You do not need prior experience with type annotations, packaging or testing frameworks. Each of these is introduced from first principles. You should know the basics of Git, since the course covers the way teams use it rather than starting from first commits.
What you will learn
- Write idiomatic Python that expresses intent directly instead of longer manual code.
- Process data too large to hold in memory using iterators and generators.
- Annotate a codebase with type hints and catch mismatches before runtime.
- Package a project with uv and pin its dependencies so a colleague gets the same build you do.
- Set up the checks a team relies on, Ruff for linting and formatting and pytest for tests, and run them automatically on every change pushed to the team's Git repository.
- Make production code fail safely and diagnosably, with useful logs and validated inputs.
Syllabus
Day 1: Language features that pay off
- Idiomatic Python: iterating sequences, zip, unpacking and namedtuples
- Iterators and generators for data too large for memory
- Decorators and closures, including caching decorators
- Classes and dataclasses
- Type annotations and static checking
- Keeping code safe to change: code rot, and maintainability by design
Day 2: The toolchain teams rely on
- Linting and formatting with Ruff
- Packaging and dependency management with uv
- Testing with pytest, and test-driven development
- Git for teams, and automated checks in the pipeline
- Error handling, logging, and data validation
- Extended case study: a prototype turned into a maintainable tool