Programming · PRC-24

Python Advanced

Python Advanced is a follow-on course to Python Basic that explores advanced Python 3.14 through practical workshops, covering magic methods, decorators, threads and asyncio, sockets, sending email over SMTP, SQLite, NumPy, Matplotlib, regular expressions and testing with pytest. It suits developers, students and IT staff who already write basic Python and want to build more capable programs.

Updated
From 5,850 THB / person 6,500 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration18 hours · 3 days
  • FormatOnsite / live online
  • Next roundOn request
  • CertificateIncluded

Course overview

Many people can write basic Python but stay stuck with short scripts. When they need programs that run several tasks at once, talk over a network, send email, store data in a database or share code with a team, they are no longer sure how to write them. Python has also changed a lot recently, with newer type hints, pattern matching, an easier asyncio and free-threaded Python officially supported in Python 3.14, so older examples online no longer reflect how code should be written today.

This course builds on Python Basic and takes learners into the advanced features of the language with Python 3.14. It starts with setting up a project with uv and pyproject.toml, then covers type hints, magic methods, linked lists, comprehensions, generators, pattern matching, dataclasses, decorators and context managers. It continues with concurrency using threads, asyncio and multiprocessing, socket programming and a chat room, sending email over SMTP, working with SQLite, calculations and charts with NumPy 2 and Matplotlib, regular expressions and testing with pytest. The course mixes workshops with short lectures and closes with a capstone that brings everything together. (3 days, 6 hours per day, 18 hours in total, Intermediate level.)

What you’ll gain

  • Set up Python 3.14 projects properly with uv, pyproject.toml and type hints
  • Use magic methods, dataclasses, decorators, generators and context managers to build reusable classes and code
  • Create and manage linked lists with your own classes
  • Choose threads, asyncio or multiprocessing for the job and prevent data races
  • Write socket servers and clients and send email over SMTP
  • Work with SQLite databases and create charts with NumPy 2 and Matplotlib
  • Search and extract text with regular expressions and write tests with pytest

Who this course is for

  • Developers and IT staff who can write basic Python and want to move to an advanced level
  • System administrators who write automation scripts in Python and want more robust code
  • Students, teachers, lecturers and trainers who teach or use Python
  • People who have completed Python Basic and want to continue

Prerequisites

  • Able to write basic Python, including variables, conditions, loops, functions, lists and dictionaries
  • A basic understanding of classes and objects, and some use of modules or packages
  • Some experience with databases or basic SQL
  • Comfortable with computers, the internet and the basic command line
  • A laptop that can run Python 3.14 and VS Code, with permission to install software

Curriculum

Course Details

This course is the 2026 edition that replaces the previous Python Advanced course. It has been rewritten for Python 3.14. It runs for 3 days, 6 hours per day (18 hours in total, 09:00-16:00), as workshops mixed with lectures. Intermediate level. The core topics remain: linked lists, magic methods, threads, sockets, SMTP, SQLite, NumPy, Matplotlib and regular expressions, with uv, type hints, pattern matching, dataclasses, decorators, asyncio, free-threaded Python, template strings and pytest added. It follows on from Python Basic and focuses on applying the language to real work, unlike Python OOP, which concentrates on object-oriented design.

Day 1 Writing Advanced Python Professionally

Section 1: Lab: Setting Up a Professional Python 3.14 Project

  • What is new in Python 3.14 and choosing the version to use
  • Manage Python, virtual environments and dependencies with uv
  • Project layout and the pyproject.toml file
  • Check and format code automatically with Ruff
  • Lab: create the starter project used throughout the course

Section 2: Type Hints, Docstrings and Good Comments

  • Type hints for variables, functions and collections
  • The newer generic syntax with [T] and type aliases
  • Check types with Pyright or mypy
  • Write docstrings and comments that help the team instead of repeating the code
  • Lab: add type hints and docstrings to existing code and fix what the checker finds

Section 3: Lab: Magic Methods

  • How __init__, __repr__ and __str__ differ
  • Magic methods for arithmetic and unary operators
  • Comparisons with __eq__, __lt__ and functools.total_ordering
  • Make a class behave like a collection with __len__, __getitem__ and __iter__
  • Lab: Money and Vector classes that work with operators like built-in types

Section 4: Lab: Linked Lists with Your Own Classes

  • The difference between singly and doubly linked lists
  • Create nodes and traverse the list
  • Insert, append and delete items at different positions
  • Use magic methods so the linked list supports loops and len()
  • Compare with list and collections.deque and when to use each

Section 5: Comprehensions, Generators, Dataclasses and Decorators

  • List, dictionary and set comprehensions, and generator expressions
  • Generators with yield for large data, and pattern matching with match
  • Dataclasses with frozen and slots
  • Write decorators, and context managers with with and contextlib
  • Lab: a timing decorator and a context manager that manages resources
Day 2 Concurrency, Networking, Email and Databases

Section 6: Lab: Threads and Preventing Data Races

  • How processes and threads differ, and the main thread
  • Create threads with a function and by subclassing Thread
  • Lock, Semaphore and Queue for the producer-consumer problem
  • ThreadPoolExecutor for running many tasks at once
  • The GIL and free-threaded Python, officially supported in 3.14

Section 7: asyncio and Multiprocessing

  • async and await for large numbers of network-bound tasks
  • TaskGroup and asyncio.timeout to manage groups of tasks
  • ProcessPoolExecutor and InterpreterPoolExecutor for heavy computation
  • Choose between threads, asyncio and processes for the job
  • Lab: a download manager that fetches many files at once with httpx

Section 8: Lab: Socket Programming and a Chat Room

  • TCP and UDP networking and what a socket is
  • Write socket servers and clients
  • Transfer files between a file server and a file client
  • A server that handles many clients with threads or asyncio streams
  • Lab: a GUI chat room with Tkinter

Section 9: Sending Email over SMTP

  • How SMTP works, ports, and STARTTLS and SSL encryption
  • Build messages with EmailMessage and send them with smtplib
  • HTML email and attachments
  • Keep passwords in environment variables and use app passwords
  • Lab: send a daily report with an attachment automatically

Section 10: Lab: SQLite Databases with sqlite3

  • Create databases and tables, and inspect data with DB Browser for SQLite
  • Insert, update, delete and query with parameters to prevent SQL injection
  • WHERE, ORDER BY, LIMIT, DISTINCT, LIKE, GLOB, IN and aggregate functions
  • UNION, INTERSECT, ALTER TABLE and transactions with with
  • Lab: store the download manager's results in a database
Day 3 Data, Text, Testing and Capstone

Section 11: Lab: Calculations with NumPy 2

  • ndarray, dtype and different ways to create arrays
  • Vectorised calculations and broadcasting
  • Indexing, slicing and filtering with conditions
  • Statistical functions and random numbers with NumPy's Generator
  • Lab: analyse sales data from SQLite with NumPy

Section 12: Lab: Charts with Matplotlib

  • Choose the right chart type for the data
  • Line, bar and pie charts and histograms
  • Add titles, labels, legends, markers and colours
  • Several charts in one figure with subplots, and saving to a file
  • Lab: a sales summary dashboard from the NumPy data

Section 13: Lab: Regular Expressions

  • Basic patterns: special characters, character classes and quantifiers
  • match, search, findall, finditer, sub and split
  • Groups, named groups and flags
  • Validate email addresses, phone numbers and codes
  • Lab: extract key information from server log files

Section 14: Testing, Logging and Template Strings

  • Write tests with pytest, including fixtures and parametrize
  • Log with the logging module instead of print
  • Template strings (t-strings), new in Python 3.14, for building text safely
  • Run the program as a command-line tool with uv

Section 15: Workshop: Automated Log Report Capstone

  • Read several log files concurrently and extract data with regular expressions
  • Store the results in SQLite and summarise the figures with NumPy
  • Create charts with Matplotlib and send the report by email
  • Write tests for the key parts and organise the project with uv
  • Present the work, review the code together and plan next steps

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

How do threads, asyncio and processes differ in Python, and which should I choose?

A process is a running program with its own memory, while a thread is a path of execution inside one process that shares memory, so you protect shared data with locks or queues. asyncio uses async and await to switch between tasks on one thread while waiting on the network, which suits large numbers of I/O-bound tasks. CPU-heavy work in standard Python is usually split across processes, but Python 3.14 officially supports a free-threaded build in which threads can truly use several cores.

What are magic methods in Python, and what are they used for?

Magic methods, or dunder methods, have special names that start and end with two underscores, such as __init__, __repr__, __add__, __eq__ and __len__. Python calls them automatically when you use operators or built-in functions on an object: a + b calls __add__ and len(x) calls __len__. This lets your own classes, such as a linked list or a money class, work with operators, loops and built-in functions just like standard types.

How do I send email with Python over SMTP?

Build the message with EmailMessage from the email module, setting the sender, recipients, subject and body. Use add_alternative for HTML and add_attachment for files. Connect with smtplib, call starttls() or use SMTP_SSL, log in with the account or an app password, and send with send_message(). Never hard-code the password; keep it in an environment variable instead.

Who is the Python Advanced course for, and what should I know beforehand?

It suits developers, IT staff, system administrators, students, teachers and anyone who has completed Python Basic and wants to move on to advanced features. You should be able to write basic Python, including variables, conditions, loops, functions, lists and dictionaries, understand basic classes, and have some experience with databases or SQL.

What will I be able to do after the Python Advanced course?

You will be able to set up projects with uv and type hints, write classes with magic methods and build linked lists, use decorators, generators and context managers, write concurrent code with threads and asyncio, build socket programs including a GUI chat room, send email over SMTP, work with SQLite, create charts with NumPy and Matplotlib, search text with regular expressions and write tests with pytest. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.

Can the Python Advanced course be run in-house for our team?

Yes. It can be run in-house for your team, with examples adapted to your work, such as the data or log files your team processes with Python, or a focus on IT automation and reporting. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.

Related articles

Articles are published in Thai.