Clean Code in Python: Write Scalable, Readable, and Maintainable Code with Modern Python, Edition 2

· Packt Publishing Ltd
5.0
1 review
Ebook
422
Pages

About this ebook

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.9Key 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.

Discover more

Ratings and reviews

5.0
1 review

About the author

Mariano Anaya is a software engineer who spends most of his time creating software with Python and mentoring fellow programmers. Mariano's principal areas of interest besides Python are software architecture, functional programming, distributed systems, and speaking at conferences. He was a speaker at Euro Python 2016 and 2017. To know more about him, you can refer to his GitHub account with the username rmariano. His speakerdeck username is rmariano.

Rate this ebook

Tell us what you think.

Reading information

Smartphones and tablets
Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.
Laptops and computers
You can listen to audiobooks purchased on Google Play using your computer's web browser.
eReaders and other devices
To read on e-ink devices like Kobo eReaders, you'll need to download a file and transfer it to your device. Follow the detailed Help Center instructions to transfer the files to supported eReaders.