Customers who viewed this item also viewed
Used - Good
$7.52$7.52
Ships from: ThriftBooks-Phoenix Sold by: ThriftBooks-Phoenix
Sorry, there was a problem.
There was an error retrieving your Wish Lists. Please try again.Sorry, there was a problem.
List unavailable.
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Clean Code in Python: Refactor your legacy code base
Purchase options and add-ons
Getting the most out of Python to improve your codebase
Key Features
- Save maintenance costs by learning to fix your legacy codebase
- Learn the principles and techniques of refactoring
- Apply microservices to your legacy systems by implementing practical techniques
Book Description
Python is currently used in many different areas such as software construction, systems administration, and data processing.
In all of these areas, experienced professionals can find examples of inefficiency, problems, and other perils, as a result of bad code. After reading this book, readers will understand these problems, and more importantly, how to correct them.
The book begins by describing the basic elements of writing clean code and how it plays an important role in Python programming. You will learn about writing efficient and readable code using the Python standard library and best practices for software design. You will learn to implement the SOLID principles in Python and use decorators to improve your code. The book delves more deeply into object oriented programming in Python and shows you how to use objects with descriptors and generators. It will also show you the design principles of software testing and how to resolve software problems by implementing design patterns in your code. In the final chapter we break down a monolithic application to a microservice one, starting from the code as the basis for a solid platform.
By the end of the book, you will be proficient in applying industry approved coding practices to design clean, sustainable and readable Python code.
What you will learn
- Set up tools to effectively work in a development environment
- Explore how the magic methods of Python can help us write better code
- Examine the traits of Python to create advanced object-oriented design
- Understand removal of duplicated code using decorators and descriptors
- Effectively refactor code with the help of unit tests
- Learn to implement the SOLID principles in Python
- ISBN-101788835832
- ISBN-13978-1788835831
- PublisherPackt Publishing
- Publication dateAugust 29, 2018
- LanguageEnglish
- Dimensions7.5 x 0.75 x 9.25 inches
- Print length332 pages
There is a newer edition of this item:
Frequently bought together

Deals on related products
Customers also bought or read
- Python Programming Blueprints: Build nine projects by leveraging powerful frameworks such as Flask, Nameko, and Django
Paperback$57.99$57.99FREE delivery Mon, May 4 - Learn Python Programming: The no-nonsense, beginner's guide to programming, data science, and web development with Python 3.7
Paperback$40.49$40.49FREE delivery Mon, May 4 - Functional Python Programming: Discover the power of functional programming, generator functions, lazy evaluation, the built-in itertools library, and monads, 2nd Edition
Paperback$51.72$51.72FREE delivery Mon, May 4 - Python for Data Analysis: Data Wrangling with pandas, NumPy, and Jupyter
Paperback$43.99$43.99FREE delivery Mon, May 4 - Python 3: The Comprehensive Guide to Hands-On Python Programming (Rheinwerk Computing)
Paperback$43.38$43.38FREE delivery Mon, May 4 - Modern Python Cookbook: 130+ updated recipes for modern Python 3.12 with new techniques and tools
Paperback$43.99$43.99FREE delivery Mon, May 4 - Fluent Python: Clear, Concise, and Effective Programming#1 Best SellerObject-Oriented Design
Paperback$43.99$43.99FREE delivery Mon, May 4 - Python Crash Course, 3rd Edition: A Hands-On, Project-Based Introduction to Programming#1 Best SellerPython Programming
Paperback$27.53$27.53Delivery Mon, May 4 - Automate the Boring Stuff with Python, 2nd Edition: Practical Programming for Total Beginners
Paperback$22.67$22.67Delivery Mon, May 4 - Machine Learning with PyTorch and Scikit-Learn: Develop machine learning and deep learning models with Python
Paperback$37.95$37.95FREE delivery Mon, May 4 - Python All-in-One For Dummies (For Dummies: Learning Made Easy)
Paperback$24.77$24.77Delivery Mon, May 4 - Python for Engineering and Scientific Computing: Practical Applications with NumPy, SciPy, Matplotlib, and More (Rheinwerk Computing)
Paperback$41.31$41.31FREE delivery Mon, May 4 - Learn Python Programming: A comprehensive, up-to-date, and definitive guide to learning Python
Paperback$35.99$35.99FREE delivery Mon, May 4
Editorial Reviews
About the Author
Product details
- Publisher : Packt Publishing
- Publication date : August 29, 2018
- Language : English
- Print length : 332 pages
- ISBN-10 : 1788835832
- ISBN-13 : 978-1788835831
- Item Weight : 1.26 pounds
- Dimensions : 7.5 x 0.75 x 9.25 inches
- Best Sellers Rank: #2,299,677 in Books (See Top 100 in Books)
- #1,396 in Enterprise Applications
- #1,785 in Python Programming
- #2,452 in Computer Programming Languages
- Customer Reviews:
About the author

Mariano Anaya is a software engineer who spends most of his time creating software solutions with Python, and mentoring fellow programmers. Mariano's main areas of interests besides Python are Linux, software architecture, functional programming, distributed systems, and speaking at conferences.
Mariano has many years of experience with Python. He has been a speaker at Euro Python 2016 and 2017, and FOSDEM 2019, and is actively participating in the Python community events.
In the past, he has been a teacher assistant at UTN (his alma mater) and whilst now he lives in Barcelona, his passion for teaching still drives his career in different ways.
Products related to this item
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from the United States
- 5 out of 5 stars
Birthday Present
Reviewed in the United States on August 28, 2025I was very happy with the product. Thank you ☺️
Sending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
If you are looking to move beyond code cookbooks
Reviewed in the United States on January 12, 2021With 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.
7 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Top reviews from other countries
Artur Baruchi5 out of 5 starsNice book, great content - lack of examples
Reviewed in Brazil on November 1, 2020This book is great to improve OOP skills in Python. It gives you a view about what can be done in Python and good practices to follow when programming in Python. Also, the way the author involve while you are reading the book is very good and the pieces fit together nicely. My concern about the book is the lack of examples, don't get me wrong, the book has a good level of code, but I think that examples should be more didactic. Some of them, I needed to read and re-read several times to understand and get the idea.
Anyway, is a great book and I really recommend it.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again














![Computer Networking Bible: [3 in 1] The Complete Crash Course to Effectively Design, Implement and Manage Networks. Including Sections on Security, Performance and Scalability](/web/20210226063146if_/https://code.visualstudio.com/assets/github-https-m.media-amazon.com/images/I/41H4YJnxKgL._AC_SR100,100_QL65_.jpg)