- Notifications
You must be signed in to change notification settings - Fork189
Clean Code in Python, published by Packt
License
PacktPublishing/Clean-Code-in-Python
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is the code repository forClean Code in Python, published by Packt.
Refactor your legacy code base
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.
This book covers the following exciting features:Set up tools to effectively work in a development environmentExplore how the magic methods of Python can help us write better codeExamine the traits of Python to create advanced object-oriented designUnderstand removal of duplicated code using decorators and descriptorsEffectively refactor code with the help of unit testsLearn to implement the SOLID principles in Python
If you feel this book is for you, get yourcopy today!
Setup
Create a virtual environment, and once activated run:
make setupThis will install the common dependencies. Besides this, each chapter mighthave additional ones, for which anothermake setup will have to be runinside that particular directory.
Each chapter has its corresponding directory given by its number.
Inside each chapter directory, tests can be run by:
make testThis requires themake application installed (in Unix environments).In environments without access to themake command, the same code can betested by running the commands on theMakefile:
python -m doctest *.pypython -m unittest *.pyAll of the code is organized into folders. For example, Chapter02.
The code will look like the following:
class Point: def __init__(self, lat, long): self.lat = lat self.long = long- In Chapter 2, page 41: Add the following import in the code:
from datetime import date
Following is what you need for this book:This book will appeal to team leads, software architects and senior software engineers who would like to work on their legacy systems to save cost and improve efficiency. A strong understanding of Programming is assumed.
With the following software and hardware list you can run all code files present in the book (Chapter 1-10).
| Chapter | Software required | Hardware required |
|---|---|---|
| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 | Python 3.7 | System with 4GB RAM |
| 10 | Docker | System with 4GB RAM |
Mariano Anayais a software engineer who spends most of his time creating software with Python and mentoring fellow programmers. Mariano's main areas of interests 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.
Click here if you have any feedback or suggestions.
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.
About
Clean Code in Python, published by Packt
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors11
Uh oh!
There was an error while loading.Please reload this page.
