Advanced Python: Best Practices and Design Patterns

Course 1906

  • Duration: 4 days
  • Labs: Yes
  • Language: English
  • Level: Advanced

This advanced Python training course will expand your foundational Python programming skills to build reliable and stable applications. In this course, you will learn how to:

  • Employ design patterns and best practices in Python applications
  • Exploit the object-oriented programming features in Python for stable, reliable programs
  • Create and manage concurrent threads of control
  • Generate and consume REST web service requests and responses
  • Implement Gang of Four (GoF) design patterns to solve commonly recurring software design problems

Advanced Python Course Delivery Methods

  • In-Person

  • Online

Advanced Python Course Benefits

Unit test, debug, and install Python programs and modules

Profile program execution and improve performance

Apply advanced Python programming features for efficient, reliable, and maintainable programs

Gain knowledge and skills applicable to all Python environments, including Microsoft Windows, macOS, and all Linux and UNIX distributions

Test your knowledge in the included end-of-course exam

Continue learning and face new challenges with after-course one-on-one instructor coaching

Advanced Python Course Outline

In this module, you will learn how to:

  • Extend classes to define subclasses
  • Add properties to a class
  • Define abstract base classes

In this module, you will learn how to:

  • Write "Pythonic" code
  • Modify code dynamically with monkey patching
  • Process large data structures efficiently with generators
  • Handle exceptions
  • Raise user-defined exceptions
  • Reduce code complexity with context managers and the "with" statement

In this module, you will learn how to:

  • Develop and run Python unit tests
  • Simplify automated testing with the Pytest package
  • Verify code behavior
  • Mock dependent objects with the Mock package
  • Use mock objects to verify code behavior when exceptions occur

In this module, you will learn how to:

  • Log messages for auditing and debugging
  • Check your code for potential bugs with Pylint
  • Debug your Python code
  • Extract error information from exceptions
  • Trace program execution with the PyCharm IDE

In this module, you will learn how to:

  • Implement the Decorator pattern using @decorator
  • Control access to an object with the Proxy pattern
  • Lay out a skeleton algorithm in the Template Method pattern
  • Enable loose coupling between classes with the Observer pattern

In this module, you will learn how to:

  • Build a REST service
  • Generate JSON responses to support Ajax clients
  • Send REST requests from a Python client
  • Consume JSON and XML response data

In this module, you will learn how to:

  • Time execution of functions with the "timeit" module
  • Profile program execution using "cProfile"
  • Manipulate an execution profile interactively with "pstats"
  • Efficiently apply data structures, including lists, dictionaries, and tuples
  • Map and filter data sets using comprehensions
  • Replace the standard Python interpreter with PyPy

In this module, you will learn how to:

  • Install modules from the PyPi repository using "pip"
  • Port code between Python versions
  • Package Python modules and applications
  • Establish isolated Python environments with "virtualenv"
  • Build a distribution package with "setuptools"
  • Upload your Python modules to a local repository

In this module, you will learn how to:

  • Create and manage multiple threads of control with the Thread class
  • Synchronize threads using locks
  • Launch operating system commands as subprocesses
  • Synchronize processes with queues
  • Parallelize execution using process pools and Executors

Need Help Finding The Right Training Solution?

Our training advisors are here for you.

Advanced Python Course FAQs

This is an advanced, fast-paced programming course. If you're completely new to Python, or know only the basics of the language, we suggest you start with either Python Fundamentals Training for Non-Programmers or Introduction to Python Training.

Absolutely! This course builds on the skills you developed in the introduction course and takes you to the next level of your proficiency with Python.

The course software uses a recent version of Python 3.

Yes, nearly all of the Python features we discuss have been back-ported to Python 2.7. Most of the examples and exercises will run under Python 2.7 with minor changes, and any language features that are not supported in Python 2.7 are clearly identified in the notes.

You will complete your exercises on a virtual machine (VM) running Microsoft Windows. The IDE for the exercises is PyCharm from Jetbrains, which is pre-installed on your VM.

This course expands on your basic Python programming skills to help you build applications that are faster, more reliable, and easier to maintain and debug. You'll gain experience not only with advanced Python techniques, you'll also learn how to implement proven software design patterns in your applications. And you'll learn valuable Python testing tools that help ensure that your code works as designed.

Yes, at the end of the class you can copy your code from your VM to your favorite cloud storage provider (Google Drive, Dropbox, etc.) You'll also receive a copy of all the examples and solutions to all hands-on exercises.

Chat With Us