Switch to the store?

Mastering Object-oriented Python

More Information
  • Understand the different design patterns for the __init__() method
  • Discover the essential features of Python 3's abstract base classes and how you can use them for your own applications
  • Design callable objects and context managers that leverage the with statement
  • Perform object serialization in formats such as JSON, YAML, Pickle, CSV, and XML
  • Employ the Shelve module as a sophisticated local database
  • Map Python objects to a SQL database using the built-in SQLite module
  • Transmit Python objects via RESTful web services
  • Devise strategies for automated unit testing, including how to use the doctest and the unittest.mock module
  • Parse command-line arguments and integrate this with configuration files and environment variables

This practical example-oriented guide will teach you advanced concepts of object-oriented programming in Python. This book will present detailed examples of almost all of the special method names that support creating classes that integrate seamlessly with Python's built-in features. It will show you how to use JSON, YAML, Pickle, CSV, XML, Shelve, and SQL to create persistent objects and transmit objects between processes. The book also covers logging, warnings, unit testing, configuration files, and how to work with the command line.

This book is broken into three major parts: Pythonic Classes via Special Methods; Persistence and Serialization; Testing, Debugging, Deploying, and Maintaining. The special methods are broken down into several focus areas: initialization, basics, attribute access, callables, contexts, containers, collections, numbers, and more advanced techniques such as decorators and mixin classes.

  • Create applications with flexible logging, powerful configuration and command-line options, automated unit tests, and good documentation
  • Use the Python special methods to integrate seamlessly with built-in features and the standard library
  • Design classes to support object persistence in JSON, YAML, Pickle, CSV, XML, Shelve, and SQL
Page Count 634
Course Length 19 hours 1 minutes
ISBN 9781783280971
Date Of Publication 21 Apr 2014


Steven F. Lott

Steven F. Lott has been programming since the '70s, when computers were large, expensive, and rare. He's been using Python to solve business problems for over 10 years. His other titles with Packt Publishing include Python Essentials, Mastering Object-Oriented Python, Functional Python Programming, and Python for Secret Agents. Steven is currently a technomad who lives in city along the east coast of the U.S. You can follow his technology blog (slott-softwarearchitect).