Course 595:
Advanced Python Programming
(2 days)
Course Description
This course presents advanced topics in Python for professional programming. It contains sections on timing and profiling, creating packages, closures and decorators, context management, client/server applications, accessing a REST service. This class is approximately 65% hands-on.
Learning objectives
- Using Jupyter Notebooks
- Logging applications at various levels
- Debugging and application
- Timing and profiling to find bottlenecks
- Details of decorators and closures
- Why and how to use iterators and generators
- Details of advanced data structures: collections, arrays, queues, and sets
- Network client-server applications
- Reading and writing JSON
- Accessing a REST service
- Concurrent programming with threads and processes
Who should attend
Experienced Python programmers who want to expand their Python knowledge into advanced topics.
Prerequisites
Three months of active programming in Python or completion of an introduction and intermediate course in Python.
Anyone who is already proficient with:
- Scalar and collection types
- All flow control including conditionals, loops, functions, and exception handling
- Creating classes with attributes and methods
- Accessing external modules and packages
- Iteration and comprehensions
- Unit Testing
- Creating and accessing your own documentation
Course Outline
Module 1: Measuring Performance
- Timing Functions
- Profiling Memory
- Finding a Bottleneck
Module 2: Additional Techniques
- Dictionary Comprehension
- Formatted String Literals
- Assignment Expression
- Match Case Statement
- Sets and Set Operators
Module 3: Decorators and Closures
- Introduction to Closures and Enclosed Functions
- What Is a Decorator?
- Understanding How Decorators Work
- Writing a Simple Decorator
Module 4: Advanced Data Structures
- Counters
- Arrays
- Queues
Module 5: Defining Context
- Context Manager
- Using with
- Creating a simple context
- Building a Context using a Class and Special Methods
Module 6: Network Client Server
- Basic Architectures
- Exchanging Data Using JSON
- Client and Server Programming for HTTP
Module 7: RESTful Applications
- Description
- Sending HTTP
- Making HTTP Responses
Module 8: Concurrent Programming
- What Is Concurrent Programming?
- Working with Subprocesses
- Techniques of Thread Programming
- Details of Multiprocessing
- Using Concurrent.futures