Outline updated November 2026
Intermediate Python
Class Duration
35 hours of live training delivered over 5 days.
Student Prerequisites
- Working knowledge of Python fundamentals (syntax, data types, control flow, functions)
- Ability to write simple Python scripts
- General programming experience in some language
Target Audience
- Experienced programmers who know Python basics and want deeper skills
- Developers moving from short scripts to larger Python programs
- New to Python? Start with Introduction to Python
- Ready for more? Continue to Advanced Python Programming
Description
Intermediate Python builds on Python basics with the tools and language features used in larger programs. The class starts with project tooling: project metadata, lockfiles, and type checking. It then covers type hints, iteration, comprehensions, data structures, functions, classes, and modules. Next comes concurrency with threads, processes, asyncio, and the free-threaded build. The course closes with files, text data formats, and network programming.
Learning Outcomes
- Manage project metadata, dependencies, and lockfiles with uv.
- Add type hints and check them with mypy or Pyright.
- Write iteration code with generators, comprehensions, and
itertools. - Use specialized data structures and classes provided by the Python standard library.
- Organize code into modules and packages.
- Cut startup time with lazy imports.
- Speed up scripts with threads, multiprocessing, asyncio, and the free-threaded build.
- Work with files, common data formats, and network services.
Training Materials
All students receive comprehensive courseware covering all topics in the course. Courseware is distributed via GitHub in the form of documentation and extensive code samples. Students practice the topics covered through challenging hands-on lab exercises.
Software Requirements
Students will need a free, personal GitHub account to access the courseware. Students will need permission to install Python and Visual Studio Code on their computers. Also, students will need permission to install Python Packages and Visual Studio Code extensions. If students are unable to configure a local environment, a cloud-based environment can be provided.
The course is taught on Python 3.15, including its free-threaded build.
Training Topics
Project Tooling
pyproject.tomland project metadatauv add,uv sync, and lockfiles- pip, conda/mamba, and Poetry
- Type checking with mypy or Pyright
Type Hints
- Built-in types
- Generics and the type parameter syntax
- Type aliases with the
typestatement Optional,Union, andAny- Function types
- Generator types
TypedDictfor structured dictionaries
Iterators
forvs.whileloops- Iterating over lists and dictionaries
- Iterating over generators
rangeandenumerate- The
itertoolsmodule - Slicing lists
Strings
- String encoding
- UTF-8 as the default encoding
- T-strings for safe interpolation
Logging
- Using the built-in logger
- Handlers
- Formatters
- Filters
Comprehensions
- List
- Dictionary
- Set
- Generator
- Conditional comprehensions
- Unpacking with
*and**in comprehensions
Data Structures
- List
- Dictionary
- Sets
- Immutable mappings with
frozendict - The
collectionsmodulenamedtupleCounterdefaultdictdeque
- Data classes
Functions
- Unpacking parameters
- Packing arguments
- Keyword-only and positional-only parameters
- Sentinel values with
sentinel - Nested functions and closures
- Function decorators
- Multiple dispatch
Classes
- Getters and setters vs. properties
- Class data and class methods
- Static methods
- Inheritance
- Multiple inheritance
- The mixin pattern
- Abstract classes
- Protocols
- Special (dunder) methods
- Monkey patching
Packages and Modules
- Namespaces and scoping
- Creating modules
- Importing modules
- Dynamic imports
- Lazy imports for faster startup
- Running modules as scripts
- Using
__init__.pyfiles
Concurrent Execution
- What is concurrent execution?
- Concurrency models
- Threads
asyncandawait- Multiprocessing
- Subprocesses
- The GIL
- Free-threaded Python
- Free-threading trade-offs
- CPU-bound vs. I/O-bound work
- Thread and process pools with
concurrent.futures - Locks and thread-safe queues
- Async programming with asyncio
- Async HTTP with httpx and aiohttp
- Threads with
asyncio.to_thread
Files, Folders, and Operating System
- Current working directory
- File and folder paths with
pathlib - Asynchronous file reads and writes
- Creating, removing, and listing directories
- Running external commands with
subprocess
Text Data Formats
- Reading and writing XML
- Reading and writing CSV
- Reading and writing JSON
- Reading and writing TOML
- Reading and writing YAML
- Reading and writing Excel files
Networking
- HTTP requests with requests and httpx
- Consuming REST APIs
- Sending email with
smtplib - Connecting to servers over SSH
- Transferring files with SFTP