Table of Contents
Introduction
Introduction & Prerequisites
Nina Zakharenko introduces herself, and reviews the system requirements as well as the tools that should be installed for the course.REPL & Running Python in VS Code
Nina reviews how to run code in the Python REPL.Course Introduction
Nina introduces what will be learned in the class, and looks at the final project that will be built.Python Philosophy
Nina reviews the Python philosophy, then shows a few fun easter eggs built into the language.Converting Between Types
Nina introduces the split and join methods that manipulate strings based on a delimiter.Practice: Converting Between Types
Nina walks through the practice segment.
Comprehensions
List Comprehensions
Nina demonstrates how to create lists recursively.Conditionals
Nina demonstrates to utlilize if statements within list comprehensions, and reviews truthy and falsey statements.List Operations
Nina reviews how to manipulate string values with sum(), min(), max(), and sorted().Sets & Dictionaries
Nina demonstrates how to create sets and dictionaries recursively.Generator Expressions
Nina explains how to create generator comprehensions (expressions).Slicing Lists
Nina reviews how to select a slice of a list, and how lists are assigned in memory when renamed.zip Function
Nina introduces the zip function as a way to create an array of tuples from two separate lists.Practice: Comprehensions, Slicing, & zip Function
Nina walks through the practice where students manipulate data structures using comprehensions, slicing, and the zip Function.
OOP
Object Oriented Programming
Nina introduces what object oriented programming is, and what it means for the Python language.Classes
Nina introduce classes, and how the self keyword is used inside classes to refer to a bound instance variable or object.Class Instances
Nina introduces an example to illustrate how an instance of a class allows the user to call methods on the class that only refer to the bound instance.Initializer Method
Nina introduces the __init__ (intializer method) as a way to invoke attributes when a class instance is instantiated.Class Methods
Nina introduces the class method, which is able to access the class variables on the type, rather than the instance.Types, isinstance, & issubclass
Nina reinforces what was learned by testing knowledge about what types different objects are, and introduces a function that checks if an object is a particular instance of a class (or subclass of the class). all() and any() are also briefly covered.Magic Methods: __str__ & __repr__
Nina introduces two methods that communicate details about the instance of the class, and the code needed to recreate this object.Inheritance
Nina introduces inheritance as a way to create types that have shared attributes. How a subclass inherites from the parent (or super) class is demonstrated, as well as how to utilize the super() function as it is implimented in Python3 to call specific methods from the parent class.Practice: Classes
Nina live-codes the practice where classes and class instances are reviewed.Practice: Inheritance
Nina live-codes the practice where subclasses and the super keyword are reviewed.Magic Methods Review
Nina writes a class that returns data about Github repositories, and reviews when to use the magic methods covered in an earlier section.
Exceptions
Exception Types
Nina introduces basic exception types that can be thrown when an error occurs, and why it's important to add them in order to write robust, and maintainable programs.Try Except
Nina demonstrates how to use an try except exception statement that prints out a helpful message to the user if an error is thrown.Error Specificity
Nina demonstrates why error order matters. Students are also warned against "swallowing the exception".Custom Exceptions
Nina demonstrates how to creat and raise custom exceptions to signal error conditions in production code.Custom Exception Application
Nina implements a custom exception in the Github API project that was started in Intro to Python.Practice: Exceptions
Nina live-codes the practice where syntax errors, custom exceptions, and other exception topics from previous sections are reviewed.
Libraries & Modules
Libraries & Modules
Nina explains how the "batteries included" way of having much functionality already included in the standard library helped Python's early success. An introduction to what's available in the standard library is also covered, as well as its drawbacks.Importing Modules
Nina demonstrates how to start a custom library, as well as best practices when importing modules, and naming imported modules with aliases.Using Exernal Packages
Nina discusses how to ensure that the correct version of pip is being utilized to download a package, and security concerns over installing mistyped packages.Practice: Standard Library
Nina reviews how to interact with several common packages, utilizing the 'as' keyword, and introduces how to use content manager.Command Line
Nina introduces how to take only necessary arguments from the arguments collected using slicing, and how to ask for input from the user.
Testing
Testing in Python
Nina gives an introduction to unit tests, integration tests, and functional tests. The 'assert' keyword's functionality is also demonstrated as a sanity check.Unit Testing
Nina demonstrates how to write a unit test, how to write error messages for when the test doesn't pass, and how to run the test file from the command line as well as how to pass flags to get different output.TestCase Assertions & Testing Libraries
Nina shows the full list of TestCase assertions, and mentions the external libraries that can be explored when the standard Python testing library falls short.Practice: Unit Testing
Nina live-codes the testing practice that reviews unit test principles that were covered in the last few sections.
Web Frameworks
Web Frameworks
Nina introduces several commonly used Python frameworks, including Django, Pyramid, and Flask.Flask Hello World
Nina demonstrates how to start a Flask app.Routing
NIna demonstrates how to add routes to the app, and also how to pass in a flag that reloads the app every time there is a saved change.Templates & Other Resources
Nina demonstrates how to begin using the templating system in Flask, and gives resources for those wanting to continue learning about Flask.Flask Practice Setup
Nina prepares the audience to go through the last exercise of the course.Practice: Flask App
Nina walks through the result of the Flask app practice.Flask Summary
Nina summarizes what was learned while doing the Flask app practice, and thanks the audience for coming.