جزییات کتاب
Key FeaturesCreate applications with flexible logging, powerful configuration and command-line options, automated unit tests, and good documentationUse the Python 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 SQLBook DescriptionAn object-oriented approach to Python web development gives you a much more fully-realised experience of the language. The flexibility and power of Python, combined with the improvements in design, coding and software maintenance that object-oriented programming allows, is built to respond to the challenges of increasingly more complex and data-intensive application development, making difficult tasks much more manageable. This book has been designed to make this sophisticated approach to programming easier to learn quickly, providing you with a clear and coherent learning journey.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 book 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 as well as working with the command line.Structured in 3 parts to make the complexity of OOP more manageable - Pythonic Classes via Special Methods, Persistence and Serialization and Testing, Debugging, Deploying, and Maintaining this book offers deep insight into OOP that will help you develop expert level object-oriented Python skills.What you will learnCreate applications with flexible logging, powerful configuration and command-line options, automated unit tests, and good documentationGet to grips with different design patterns for the __init__() methodDesign callable objects and context managersPerform object serialization in formats such as JSON, YAML, Pickle, CSV, and XMLMap Python objects to a SQL database using the built-in SQLite moduleTransmit Python objects via RESTful web servicesDevise strategies for automated unit testing, including how to use the doctest and the unittest.mock moduleParse command-line arguments and integrate this with configuration files and environment variablesAbout the AuthorSteven F. Lott has been programming since the 70s, when computers were large, expensive, and rare. As a contract software developer and architect, he has worked on hundreds of projects, from very small to very large. He's been using Python to solve business problems for over 10 years.Table of ContentsThe _init_() MethodIntegrating Seamlessly with Basic Python Special MethodsAttribute Access, Properties, and DescriptorsThe ABCs of Consistent DesignUsing Callables and ContextsCreating Contrainers and CollectionsCreating NumbersDecorators and Mixins: Cross-Cutting AspectsSerializing and Saving JSON, YAML, Pickle, CSV, and XMLStoring and Retrieving Objects via ShelveStoring and Retrieving Objects via SQLiteTransmitting and Sharing ObjectsConfiguration Files and PersistenceThe Logging and Warning ModulesDesigning for TestabilityCoping with the Command Line