PY
Python — Advanced
Go deep: decorators and context managers, advanced typing, concurrency with asyncio, threads and processes, building validated REST APIs with FastAPI, talking to PostgreSQL, and packaging and deploying Python services.
Lessons
- 1Decorators & Context ManagersWrap functions with reusable behaviour and manage resources with `with`.
- 2Advanced Typing: Generics & ProtocolsGeneric functions and classes, Protocols for duck typing, and overloads.
- 3Async Programming with asyncioRun many I/O-bound tasks concurrently with async / await.
- 4Threads, Processes & the GILUse concurrent.futures to speed up I/O-bound and CPU-bound work.
- 5Building REST APIs with FastAPITyped routes, automatic validation with Pydantic, dependencies and interactive docs.
- 6Working with PostgreSQL from PythonConnect with psycopg 3, run parameterised queries, use transactions and pools.
- 7Command-Line Tools with argparseTurn scripts into proper commands with arguments, options, subcommands, help text and exit codes.
- 8Project Structure, Quality Tools & Deploymentpyproject.toml, src layout, ruff, logging, configuration and Docker.
- 9Project: A Results Analysis ToolCombine everything — dataclasses, validation, statistics, ranking and reports — into a small, tested package.