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)
This is by far one of the best, solid Python books out there.I found it very useful and I think it'd fit to any level, beginners all the way to very experienced Python programmer.What I really liked here, besides the fact that it is simply written well, is that it ties Python development and methodology to this whole clean code domain. SOLID and others are just examples.The book highlights Best practices that we all need to follow in order to have a well maintained Python code that will operate well for a long time.Ch. 2 has this Pythonic code which I found very useful. It simply tells you how to write correct Python code and I learned a lot of new great things.Ch 3 continues on the same path and expand it even more while sticking to the general code code practices that can be applied for any language but here, it is used in the context of Python code.Ch 5 explains about decorator and I learned a bunch of cool tricks. This part becomes a bit more (or maybe a lot more) towards the experienced part of the language.I think from ch 6, things are really interesting. I actually did not know many of these. It will explain co-routines, generators and much more.It finalized with unit tests, design patterns (great re-cap), and even Docker!Grab it! worth every cent.
** I got this book as part of a $5 sale on Packt to be transparent **I plan on reading this book again a bit later because the information I was able to extract from it has already benefited me in the workplace. One cool thing is that the information isn't just reserved to Python but also software development and software engineering principles.I think the format (i.e. the way the information presented) is well done as well, often times I see something I don't understand and the author rushes in to explain what's going which is greatly appreciated. However this isn't without it's faults, as another reviewer mentioned the book could use some editing in certain places where the words chosen may seem a bit convoluted and other times unclear.The impact of this isn't too detrimental but still it left me with some question marks about what the author wanted to say on certain pages. Hopefully a second read would clear those up however.I already recommended the book to some of my colleagues as well at my job.
This is a good book that highlights the importance of clean code. It has lots of references to Python Enhancement Proposals (PEPs) and follows them.It is meant as a reference book. See the table of contents for topics covered to find out if this is a book useful for you as a programmer.
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