Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Events
Videos
Audiobooks
Packt Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds

Free eBook - Clean Code in Python - Second Edition

4.6 (34 reviews total)
By Mariano Anaya
  • A new free eBook every day on the latest in tech
  • 30 permanently free eBooks from our core tech library
  1. Introduction, Code Formatting, and Tools
About this book
Experienced 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.
Publication date:
January 2021
Publisher
Packt
Pages
422
ISBN
9781800560215

About the Author
  • Mariano Anaya

    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.

    Browse publications by this author
Latest Reviews (34 reviews total)
The last project I remember using Python for was a game side-project with PyGame (a lot of fun 🎮). That was several years ago. Recently, I had an opportunity to work on a large Python code base, so I was excited to use the language in a professional setting. Still, I knew I had a bit of relearning to do.Sure, I know the fundamental Python syntax to accomplish the task at hand. I could get the job done with that knowledge alone. However, to the experienced Python developer, it would be clear that I was coming from another language without writing idiomatic Python. I'd be missing out on the parts of Python that make it so unique, powerful, and elegant.I wanted to learn about Python approaches to following clean code principles and implementing specific code patterns from my experience in other languages like C#. Clean Code in Python has been an incredible resource for me in this regard. As the title suggests, it covers aspects of what makes clean code; SOLID principles, unit testing, and more.If you're interested in going beyond the language's basic syntax to begin writing clean, idiomatic Python, check this book out! I highly recommended it.
Das Buch ist zu oberflächlich geschrieben. Einfache Beispiele fehlen.
With so many Python books out there it’s hard to know which are worthwhile, particularly if you want to move beyond basics. This book is highly recommended for this category of Python programmer. It’s a must read for people working in agile development teams. It is well organized and written, containing material not treated elsewhere, or at least not in a single volume. Writing clean code goes beyond “having good documentation”. At a certain point, this good documentation becomes more of a distraction than anything, particularly in Python. Well written Python should be the documentation minimalist’s dream and that is the main idea throughout this book: how to write efficient, properly documented Python code that is easily maintainable, by ourselves and other developers. The authors are not simply talking about code linting or analyzers, it’s more like the Zen of Python. They include examples of moving from some code to better code. The focus is on the readability of code since so many developers spend their time reading scads of code to add a simple feature, but there are also many examples of interesting ways to get things done in Python.
Recommended For You
Expert Python Programming - Fourth Edition

Attain a deep understanding of building, maintaining, packaging, and shipping robust Python applications

By Michał Jaworski and 1 more
Python Data Cleaning Cookbook

Discover how to describe your data in detail, identify data issues, and find out how to solve them using commonly used techniques and tips and tricks

By Michael Walker
Data Engineering with Python

Build, monitor, and manage real-time data pipelines to create data engineering infrastructure efficiently using open-source Apache projects

By Paul Crickard
Mastering Python for Networking and Security - Second Edition

Tackle security and networking issues using Python libraries such as Nmap, requests, asyncio, and scapy

By José Manuel Ortega