Modern Python Cookbook: 130+ updated recipes for modern Python 3.12 with new techniques and tools Modern Python Cookbook: 130+ updated recipes for modern Python 3.12 with new techniques and tools Paperback Kindle
Best Sellers Rank: #79,558 in Books (See Top 100 in Books) #7 in Computer Programming Structured Design #55 in Python Programming #187 in Internet & Social Media
Customer Reviews: 4.9 out of 5 stars 12Reviews
Product Information
From the Publisher
The book is split into four sections to help you easily find the recipes you need when you need them
Section one, Python Fundamentals, covers all the essential techniques you need to become an effective Python developer. You’ll explore strings and tuples and go in depth into number types so you can take on a host of advanced numerical programming problems. You’ll see how to use complex statements, type hints, and built-in data structures like lists and dictionaries, and you’ll even dip into debugging with the f-string.
Section two, Object-Oriented and Functional Design Approaches, will take you through a series of recipes for both programming paradigms. You’ll find out how to create classes and related type hints, work with objects, extend built-in classes, and manage resources with context managers. You’ll also be introduced to function definitions, immutable objects, generator expressions, how to create partial functions, and more.
Move from beginner to more advanced topics when you’re ready
Section three, More Sophisticated Designs, will help you solve more advanced Python programming problems. You’ll go deeper into type hints and look at the match statement, explore Pydantic’s uses for strict run-time type-checking, work with paths and files in a wide variety of types (including CSV, JSON, and XML), use Beautiful Soup for extracting data, Jupyter Lab and matplotlib for data analysis and visualization, see how to design larger applications by combining a number of smaller components, and learn to deal with the problems that come from doing so. As you come close to the end of the book, you’ll find recipes on handling configuration files, how to implement the commanddesign pattern, and how you can wrap non-Python tools in Python and use that ability to your advantage by radically rethinking the UX.
Move beyond development and get ready for production
The last section, Completing a Project: Fit and Finish, will help you put everything together so that you can deliver functional and deployable applications. You’ll find recipes on testing, first using built-in solutions like doctest and unittest, and then expanding out to use the external tool pytest. You’ll also find coverage on handling dependencies and managing virtual environments. You’ll use the built-in module venv, but also explore conda, with its pre-built binaries and accessible compiler, and poetry for an all-in-one virtual environment manager and package installer. The section closes with a chapter covering documentation and style. You’ll see how to use tools for linting, to find and remove bugs, how to format your code for quality assurance, and how to use the sphinx tool – which will help you create comprehensive and readable documentation.