Advanced Python: Best Practices and Design Patterns

Level: Advanced
Rating: 4.7/5 4.69/5 Based on 157 Reviews

This advanced Python training course will expand upon your fundamental Python programming skills to build reliable and stable applications. You will learn to employ design patterns and best practises in Python applications, exploit the OOP features in Python for stable, reliable programs and, create and manage concurrent threads of control. Additionally, learn to generate and consume REST web service requests and responses and increase performance with efficient use of data structures and native code. Learn to implement Gang of Four (GoF) design patterns in order to solve commonly recurring, real-world software design programs, thereby avoiding pitfalls and greatly improving the effectiveness of your programming efforts.

NEW! MULTI-COURSE PYTHON TRAINING BUNDLE NOW AVAILABLE

This course is now available as part of a multi-course, blended learning premium training bundle! Take your Python skills and career to the next level with multi-modal learning path bundles that lead to certification.

Explore Data Science Bundles

Key Features of this Advanced Python Training:

  • After-course instructor coaching benefit
  • Learning Tree end-of-course exam included

You Will Learn How To:

  • Employ design patterns and best practises in Python applications
  • Unit test, debug, and install Python programs and modules
  • Profile program execution and improve performance
  • Apply advanced Python programming features for efficient, reliable, maintainable programs

Choose the Training Solution That Best Fits Your Individual Needs or Organisational Goals

LIVE, INSTRUCTOR-LED

In Class & Live, Online Training

  • 4-day instructor-led training course
  • After-course instructor coaching benefit
  • Learning Tree end-of-course exam included
View Course Details & Schedule

Standard £1695

RESERVE SEAT

PRODUCT #1906

TRAINING AT YOUR SITE

Team Training

  • Bring this or any training to your organisation
  • Full - scale program development
  • Delivered when, where, and how you want it
  • Blended learning models
  • Tailored content
  • Expert team coaching

Customize Your Team Training Experience

CONTACT US

Save More on Training with Learning Tree Training Vouchers!

Our flexible, easy-to-redeem training vouchers are available to any employee within your organisation. For details, please call 0800 282 353 or chat live.

In Class & Live, Online Training

Note: This course runs for 4 Days

  • 9 - 12 May 9:00 AM - 4:30 PM BST Online (AnyWare) Online (AnyWare) Reserve Your Seat

  • 8 - 11 Aug 9:00 AM - 4:30 PM BST Online (AnyWare) Online (AnyWare) Reserve Your Seat

  • 15 - 18 Feb 2:00 PM - 9:30 PM GMT Online (AnyWare) Online (AnyWare) Reserve Your Seat

  • 19 - 22 Apr 2:00 PM - 9:30 PM BST Herndon, VA / Online (AnyWare) Herndon, VA / Online (AnyWare) Reserve Your Seat

  • 31 May - 3 Jun 2:00 PM - 9:30 PM BST Ottawa / Online (AnyWare) Ottawa / Online (AnyWare) Reserve Your Seat

  • 16 - 19 Aug 2:00 PM - 9:30 PM BST New York / Online (AnyWare) New York / Online (AnyWare) Reserve Your Seat

Guaranteed to Run

When you see the "Guaranteed to Run" icon next to a course event, you can rest assured that your course event — date, time — will run. Guaranteed.

Advanced Python Course Information

  • Requirements

    • Working knowledge of Python programming to the level of:
      • Course 1905, Python Programming Introduction, or at least three to six months of Python programming experience
  • Software

    • Concepts taught are applicable to all Python environments, including Microsoft Windows, macOS, and all Linux and UNIX distributions

Advanced Python Course Outline

  • Object-Oriented Programming in Python

    • Extending classes to define subclasses
    • Adding properties to a class
    • Defining abstract base classes
  • Exploring Python Features

    Writing "Pythonic" code

    • Modifying code dynamically with monkey patching
    • Processing large data structures efficiently with generators

    Handling Exceptions

    • Raising user-defined exceptions
    • Reducing code complexity with context managers and the "with" statement
  • Verifying Code and Unit Testing

    Testing best practises

    • Developing and running Python unit tests
    • Simplifying automated testing with the Pytest package

    Verifying code behaviour

    • Mocking dependent objects with the Mock package
    • Use mock objects to verify code behaviour when exceptions occur
  • Detecting Errors and Debugging Techniques

    Identifying errors

    • Logging messages for auditing and debugging
    • Checking your code for potential bugs with Pylint

    Debugging Python code

    • Extracting error information from exceptions
    • Tracing program execution with the PyCharm IDE
  • Implementing Python Design Patterns

    Structural patterns

    • Implementing the Decorator pattern using @decorator
    • Controlling access to an object with the Proxy pattern

    Behavioral patterns

    • Laying out a skeleton algorithm in the Template Method pattern
    • Enabling loose coupling between classes with the Observer pattern
  • Interfacing with REST Web Services and Clients

    Python REST web services

    • Building a REST service
    • Generating JSON responses to support Ajax clients

    Python REST clients

    • Sending REST requests from a Python client
    • Consuming JSON and XML response data
  • Measuring and Improving Application Performance

    Measuring Application Execution

    • Timing execution of functions with the "timeit" module
    • Profiling program execution using "cProfile"
    • Manipulating an execution profile interactively with "pstats"

    Employing Python language features for performance

    • Efficiently applying data structures, including lists, dictionaries and tuples
    • Mapping and filtering data sets using comprehensions
    • Replacing the standard Python interpreter with PyPy
  • Installing and Distributing Modules

    Managing module versions

    • Installing modules from the PyPi repository using "pip"
    • Porting code between Python versions

    Packaging Python modules and applications

    • Establishing isolated Python environments with "virtualenv"
    • Building a distribution package with "setuptools"
    • Uploading your Python modules to a local repository
  • Concurrent Execution

    Lightweight threads

    • Creating and managing multiple threads of control with the Thread class
    • Synchronising threads using locks

    Heavy-weight processes

    • Launching operating system commands as subprocesses
    • Synchronising processes with queues
    • Parallelizing execution using process pools and Executors

Team Training

Advanced Python Training FAQs

  • I’m just starting out in Python, do you recommend I start with this course?

    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 Course 1904, Python Fundamentals Training for Non-Programmers or Course 1905, Introduction to Python Training.

  • I’ve already taken Course 1905: Introduction to Python. Is this the right course to take next?

    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.

  • Which version of Python is used for the examples and hands-on exercises?

    The course software uses a recent version of Python 3.

  • My team is using Python version 2.7, does this class still apply to me?

    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.

  • What software will I be using for the hands-on exercises?

    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.

  • I’m a software developer, how can I benefit from this class?

    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.

  • Can I keep a copy of the code that I write in the course?

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

Data Science
Bundled Training

Extend learning beyond a single event with bundled content designed for real-world application.

Questions about which training is right for you?

call 0800 282 353
chat Live Chat





Why do we require your location?

It allows us to direct your request to the appropriate Customer Care team.

100% Satisfaction Guaranteed

Your Training Comes with a 100% Satisfaction Guarantee!*

*Partner-delivered courses may have different terms that apply. Ask for details.

Online (AnyWare)
Online (AnyWare)
Online (AnyWare)
Herndon, VA / Online (AnyWare)
Ottawa / Online (AnyWare)
New York / Online (AnyWare)
Why do we require your location?

It allows us to direct your request to the appropriate Customer Care team.

Preferred method of contact:

Please Choose a Language

Canada - English

Canada - Français