Course Description
This course provides a general overview of Python basics needed to create successful object oriented Python applications. It then goes into detail in creating object oriented Python applications and provides instructions on the creation of common design patterns in Python. The course finishes up with recommendations on increasing performance of your Python applications whether it be for reducing memory or decreasing the run time of an application.
What am I going to get from this course?
Create high high-performance objects and applications that can be used in production environments
Prerequisites and Target Audience
What will students need to know or do before starting this course?
Although students will learn basic Python syntax needed to begin object oriented development in Python, students should be familiar with the general programming terminology and logic such as if and else statements. They should also be familiar with the general idea of class object concepts such as inheritance.
Students should know how to install applications on their system and install Python 3.
Who should take this course? Who should not?
Students that would like to learn advanced Python techniques will benefit from this course. Also, those students used to another programming language and want to create Python applications for the first time may also benefit. This course dives into utilizing Python for creating advanced class objects and optimizing them for production value. Students that already know advanced object oriented Python techniques may not benefit from this course.
Curriculum
Module 1: Python Basics
09:04
This is a general overview of the course.
Lecture 2
Python Basics Overview
00:25
An overview of the items discussed relating to Python basics.
Lecture 3
Python Interpreter and the Versions Available
01:39
Learn why python is an interpreted language. We will also discuss the versions of Python available and why you would choose one version over the other.
Lecture 4
Why Choose Python
01:40
Know the reasons for choosing Python to build your application.
Lecture 5
Your Python Environment
04:02
Installing Python on Common Systems: An overview of installing and running Python on different environments.
Environment: Learn some common settings you may need to run your Python application.
Pip: Pip is a popular application used to access Python package repositories. You will learn common pip commands to find and install the package you need.
Project File Structure: Learn how the file structure of your project will affect how your Python application runs and how package modules are utilized.
Quiz 1
Python Environment Quiz
Be prepared to setup your environment for Python development.
Quiz 2
Assignment: Setup your Project
Setup your project in preparation of the Python Class Object module.
Lecture 6
Syntax Overview/Variables
02:40
Overview of the content being covered by the syntax module. Python variables are also covered in this lecture.
Lecture 7
Logical and Bitwise Operators
03:54
Learn common logical and bitwise operators to write successful Python applications.
Lecture 8
If Statements
07:22
Lecture 9
While Loops
02:06
Lecture 10
For Loops
04:13
Lecture 11
Defining Methods and Main
08:34
Define methods and parameters. Also, define a main function and understand “__name__.” The variable scopes local and global are demonstrated.
Lecture 12
Dictionaries, Tuples, and Lists
07:32
Know the difference and when to use a dict, list, or tuple.
Lecture 13
Strings and Formatters
09:43
Strings, Unicode, and string formatters are demonstrated. Also, string encoding will be discussed.
Lecture 14
Anonymous Functions
03:40
Python has powerful anonymous functions called lambdas. You learn how to use them and their advantages.
Quiz 3
Python Basics Quiz
Be sure you are familiar with the basics of Python syntax to continue with the next module.
Quiz 4
Fizz Buzz Assignment
A common Python interview question is to solve the FizzBuzz puzzle. The FizzBuzz puzzle goes as follows for the integers 1 through 100 print on each line "Fizz" if the integer is divisible by 3, "Buzz" if the number is divisible by 5, "FizzBuzz" if the number is divisible by 3 and 5, and print the integer value for all other cases. The solution should look like the following for the numbers 1 through 20.
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
Create a script that runs by the command "python fizzbuzzsolution.py" on your system. In your solution use a for loop or in line for loop and if or inline if statements. Define a method for your solution called "print_fizz_buzz" and be sure to call your method from a method that you define as your main method.
Module 3: Python Class Objects
02:20:43
Lecture 15
Introduction
00:38
Overview of the Python class objects module
Lecture 16
Creation and Instantiation
01:58
Create and instantiate a Python class. Know how to create a class constructor.
Lecture 17
Python Class Attributes
06:10
Create protected, private, and public attributes. Know the difference and their behavior in Python.
Lecture 18
Python Instance Class Attributes
05:49
Know the difference between class attributes (static types in some languages) and instance attributes.
Lecture 19
Inheritance in Python
18:48
Know what a super class is and create classes that inherit from a super class. Understand the super method call in an inherited method.
Lecture 20
Class Interface
15:14
Implement the commonly used interface design pattern in Python and make sure your method stubs are implemented when inherited.
Lecture 21
Class Factory - Factory by If Statements
10:01
Implement a class factory to maintain the creation of new object types.
In this lecture we implement the factory pattern using if statements.
Lecture 22
Class Factory - Metaclasses
12:07
Implement a class factory to maintain the creation of new object types.
In this lecture we implement the factory pattern using a metaclass.
Lecture 23
Multiple Inheritance
06:54
Learn the method to inherit attributes from many parent classes if you must.
Lecture 24
Class Decorators
12:53
Be familiar with class decorators such as @property, @staticmethod, and @classmethod.
Lecture 25
Base Methods
15:35
Customize custom behaviors such a printing your custom object by overriding base methods such as __str__.
Lecture 26
Custom Base Object, Collections, and Dict Objects
18:22
Inherit from base objects such as list to create your own complex objects or collection of objects.
Lecture 27
Custom Base Object, Collections, and Dict Objects - Demonstrate Custom List Container
16:14
Inherit from base objects such as list to create your own complex objects or collection of objects. In this lecture we demonstrate the functionality of the custom list container we created.
Quiz 5
Python Class Objects
Be familiar with Python class object concepts and design patterns to create successful applications that are ready for a production environment.
Quiz 6
Assignment: Inherit from the dictionary class
Create a class that inherits from the dictionary class.
Note 1
Python Class Objects Source Code
Download the source code used for the demonstrations of this lecture.
Module 4: Enhancing Performance
34:28
Lecture 28
Enhancing Performance Introduction
01:03
Overview of the lectures in the Python optimization module.
Lecture 29
Loading and Unloading Data Quickly
04:06
Use cPickle to serialize and unserialize data from storage.
Lecture 30
Options for Reducing the Amount of Memory Being Used
05:24
Python includes features out of the box such as using “yield” for generators for reducing the amount of memory being utilized at one time. Learn by example how to utilize this powerful feature.
Lecture 31
Multi-threading and Multi-processing
11:37
Know the difference between the two methods and know when to use them to decrease the run times of your application jobs.
Lecture 32
Use Specialized Packages for the Right Job
03:44
Be aware of the correct packages to utilize for your needed functionality. There may exist packages tuned to maximize the performance of your task.
Lecture 33
Compile to C
05:18
Learn to use Cython to compile a Python application to C objects.
Lecture 34
Utilize your GPU for Maximum Performance
03:16
Learn about the popular Python packages created so you can take advantage of the many GPU cores that exist in 3D graphics cards today.
Quiz 7
Python Optimization
Be ready to optimize your applications whether you need to reduce the run time of your application or make it fit into memory.
Quiz 8
Optimization Assignment
Complete the optimization assignment.
Note 2
Enhancing Performance Source Code
Download the source code used in the module demonstrations.