Clean Code in Python
Mariano Anaya
- 06 januari 2021
- 9781800562097
Samenvatting:
Write professional, scalable, and maintainable Python code by applying industry-approved clean coding principles. Learn to refactor, implement SOLID principles, and structure code efficiently using the latest features in Python 3.9
Key Features
- Enhance your coding skills using the new features introduced in Python 3.9
- Implement the refactoring techniques and SOLID principles in Python
- Apply microservices to your legacy systems by implementing practical techniques
Book DescriptionExperienced professionals in every field face several instances of disorganization, poor readability, and testability due to unstructured code. This second edition has been updated to reflect new best practices in Python 3.9, helping developers write professional, scalable, and maintainable code. It introduces advanced object-oriented design, decorators, descriptors, and refactoring strategies using SOLID principles. Whether modernizing legacy projects or building new applications, this book provides practical techniques to write cleaner and more efficient Python code using the Python standard library and manage your projects successfully. The book begins by describing the basic elements of writing clean code and how it plays a key role in Python programming. The book discusses object-oriented programming in Python and show you the design principles of software testing and how to resolve problems by implementing software design patterns in your code. In the concluding chapter, we break down a monolithic application into a microservices-based one starting from the code as the basis for a solid platform. By the end of this clean code book, you will be proficient in applying industry-approved coding practices to design clean, sustainable, and readable real-world Python code. What you will learn
- Set up a productive development environment by leveraging automatic tools
- Leverage the magic methods in Python to write better code, abstracting complexity away and encapsulating details
- Create advanced object-oriented designs using unique features of Python, such as descriptors
- Eliminate duplicated code by creating powerful abstractions using software engineering principles of object-oriented design
- Create Python-specific solutions using decorators and descriptors
- Refactor code effectively with the help of unit tests
- Build the foundations for solid architecture with a clean code base as its cornerstone
Who this book is for
This book is intended for software engineers, team leads, and architects who want to write Pythonic, scalable, and maintainable code. It is ideal for professionals looking to improve code quality, enhance testability, and refactor large-scale projects efficiently. A basic understanding of Python and object-oriented programming is recommended.