Oreilly - Mastering Object-Oriented Programming with Python
by Burkhard Meier | Released August 2019 | ISBN: 9781789618112
Build robust and maintainable applications with object-oriented programming in PythonAbout This VideoWrite your own logging classes and documentation and unit-test your codeUse Python's special methods to integrate seamlessly with built-in features and the Standard libraryDesign classes to support object persistence in JSON, YAML, Pickle, CSV, XML, Shelve, and SQLIn DetailObject-oriented programming—combined with Python's flexibility and power and accompanied by improvements in design, coding, and software maintenance—makes difficult tasks much more manageable. This course offers deep insights into object-oriented programming (OOP) to help you develop expert-level, object-oriented Python skills.Starting with a detailed analysis of object-oriented analysis and design, you will quickly master classes, data encapsulation, inheritance, polymorphism, abstraction, and exceptions. We show you how to use JSON, YAML, Pickle, CSV, XML, Shelve, and SQL to create persistent objects and transmit objects between processes. We iterate over collections, using properties and class methods; explore closures and mix-ins; and command-line arguments.By the end of this course, you will find that programming in OOP clears the mind and makes your code reusable, readable, and extendable as well as easy to maintain.Beginning by looking at a range of design patterns for the _init_() method, you will learn how to effectively use a range of Python's special methods to create classes that integrate with Python's built-in features, and find detailed explorations and demonstrations of callables and contexts, containers and collections, numbers and decorators, and mixins, with a focus on best practices for effective and successful design. The video also features information that demonstrates how to create persistent objects using JSON, YAML, Pickle, CSV, XML, Shelve, and SQL and shows you how to transmit objects between processes. Going further into OOP, you'll find expert information on logging, warnings, unit testing, and working with the command line.Structured in 3 parts to make OOP's complexity more manageable (Pythonic Classes via Special Methods; Persistence, Serialization, and Testing; and, Debugging, Deploying, and Maintaining), this course provides deep insights into OOP that will help you develop expert-level, object-oriented Python skills.Downloading the example code for this course: You can download the example code files for this course on GitHub at the following link: https://github.com/PacktPublishing/-Mastering-Object-Oriented-Programming-with-Python-V-. If you require support please email:
[email protected] Show and hide more
- Chapter 1 : Python Class Logging, Docstrings, and Unit Testing
- The Course Overview 00:07:29
- Using Python’s Built-In Logging Module 00:09:34
- Creating Our Own OOP Classes 00:09:28
- Writing Our Own Custom Logging Class 00:13:21
- Performing Unit Testing 00:11:42
- Writing Docstrings for Code Documentation 00:15:51
- Refactoring Our Code to Keep It Clean 00:08:02
- Searching Directories to Inspect Our Own Code 00:09:18
- Chapter 2 : Making Objects Persistent with Python
- Serializing Python Objects with Pickle in Binary Format 00:08:10
- Serializing Python Objects with JSON in Text Format 00:15:38
- Storing Data in an SQLite Database 00:08:29
- Serializing Data with PyYAML 00:05:13
- Persisting Data with Shelve in a Dictionary-Like Manner 00:06:31
- Parsing XML Element Trees 00:08:00
- Reading and Writing Data in CSV Format 00:11:26
- Reading and Writing Data to Excel 00:13:20
- Chapter 3 : Python Special Methods
- Passing Arguments into the __init__ Initializer Class Method 00:07:30
- Calling Super to Initialize Parent Classes 00:05:04
- Using __repr__ and __str__ for String Representation 00:06:20
- Defining the API via the __all__ Special Method 00:04:54
- Parsing Command Line Arguments Using argparse 00:06:12
- Handling Exceptions with try/except/finally 00:05:36
- Chapter 4 : Python Collections and Properties
- Iterating over Collections to Retrieve Data 00:05:00
- Using Python Generators for Large Datasets 00:03:38
- Nesting Python Dictionaries to Create Complex Data Structures 00:05:47
- Using @property as setters and getters 00:05:11
- Getting and Setting Class Attributes 00:06:07
- Wrapping Functions in Decorator Classes 00:06:10
- Chapter 5 : Diving Deeper into Object Orientation in Python
- Using Inheritance to Extend Our Classes 00:11:30
- Looking into Multiple Inheritance with Python 00:09:36
- Designing Classes for Polymorphism 00:11:01
- Avoiding Class Type Checking with Duck Typing 00:06:25
- Adding Functionality to Classes with Mixins 00:06:25
- Using Class Methods for Defining Constructors 00:10:15
- Coding Closures as Helper Functions Within Methods 00:08:40
- Starting and Stopping Threads 00:11:00
- Using Multiprocessing Queues to Pass Data 00:08:00
Show and hide more