My top books on Python

Hello, Habr! I am Slava, head of the "Professional Tools" team in Tsian, a member of the Moscow Python Conf and a member of the core team of authors at Yandex.Practicum.



Together with the guys, we are developing the Middle python developer course , and today I want to share my personal list of books that will help you structure and deepen your knowledge of Python development.







Learning Python by Mark Lutz







The top is opened by Mark Lutz's book "Learning Python". It holds a special place in my career - it was through it that I learned Python. As a student, it seemed to me a fundamental work - there are almost fifteen hundred pages in the book!



The book will allow you to enter Python, as they say, from scratch. Why do people program in Python? Who is using Python today? What can you do with Python? What are the strengths of Python? Answering these questions will give you a general understanding of the language.



The book introduces the reader to the interactive mode - the Python command line. You will learn about how to output text to standard output, about modules and their import, about the peculiarities of using Python on Windows.



The following is a description of the data types and features of working with them. Separate chapters cover the work with strings and dictionaries. You will learn about branching and loops, iterators, generators, functions and their arguments, modules and packages as ways of organizing your code. This is followed by an introduction to OOP: classes, inheritance, operator overloading, polymorphism, and metaclasses. Explains about exceptions and their role in the language.



In my opinion, "Learning Python" very smoothly and comprehensively introduces the reader to the world of Python, on the one hand, without going into details, on the other, giving the whole picture.



High Performance Python: A Practical Guide for People, Misha Gorelik, Jan Oswald







The second place in the top is occupied by the book by M. Gorelik and J. Oswald "High Performance Python: A Practical Guide for People".



The book will give you a little peek under the hood of the tongue. What is high performance in terms of Python? The book introduces the Python virtual machine, teaches you how to use profiling tools to find bottlenecks in the use of processor time, talks about data types from the point of view of their internal structure.



You will learn about multithreading, asynchronous and multiprocessor execution, how to organize cluster computing, and how to consume less RAM. For the more sophisticated, there is a separate chapter on compiling Python code in C.



Your code may be perfectly correct, but not fast enough. To make it work faster, you need to understand how the language in which you write works. This hands-on guide will help you gain a deep understanding of Python implementation.



"Python. Test Driven Development ", Harry Percival







The next top book is “Python. Development Based on Testing "Harry Percival. I was lucky enough to talk to Harry as part of the last Russian Python Week 2020 . They say the British are prim, with a strange sense of humor. I think these are stereotypes. Harry joked a lot and funny, smiled, told stories from life, was very open. Best of all, Harry will tell about his book himself.





, , . Python «Dive Into Python» — 2008-. , , — . - 14- -. . , , -. : «, !» -, . — , . , . Python — - -? ! Django-, - — , . ? . .



, , . - , 12 -, -, .



– . , , . . … , -. . , , ! , , !



. , , , — .



, . , : «- ? ?» : — . — . . : « ? , !» : «-, , ». , , , . ! - ! , - , — . .



Test driven development is not a natural thing; it takes practice to get into it. In the book I’m just trying to give a little practice.


The book will allow you to rethink your work and approach to it, it will literally turn your mind around. Many routine things will take on new meaning, interest will appear in them. The quality of tests will improve markedly, and this will inevitably affect the quality of the code and the architecture of the application.



Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices, Harry Percival, Bob Gregory







I couldn't help but talk to Harry Percival about a new book he is co-authoring with Bob Gregory on, Architectural Patterns in Python. The book can be read for free at www.cosmicpython.com . Harry continues.

. -, , API, , , — e2e-, ; , . , , — . , : , , , . , — , .



. , , - e2e- . . .



: , . , . Java C# ( -) Python. , Java Python ( ), , pythonic way.



The main question I'm trying to answer in this book is how an application architecture can help us get the highest quality tests.


The book should be read as a continuation of “Python. Test Driven Development ". If you liked the first book, and the ideas presented there resonated with you, then the second book will answer all your questions and help bring the approach to life - at work or in your personal project.



"Python. To the heights of excellence ", Luciano Ramallo







The book “Python. To the heights of excellence ”by the magnificent Luciano Ramalho. The book became very successful and has been translated into eight languages.



If I try to explain in one line what this book is about, then I would say this: it is about how to use Python 3 in the best possible way.



Luciano is 66 years old and lives and works in Sao Paulo, Brazil. I was fortunate enough to talk to him as part of the past Russian Python Week 2020 . Despite his age, Luciano seemed to me a very lively, open and cheerful interlocutor.







Luciano is currently working on the second edition of the book. He shared that the main change in the new book will be the chapter "Introduction to Type Hints" - it is not finished yet, but it is already 60 pages long, and this will be the largest chapter of the book!



Once Luciano was called to play volleyball.



“I don’t know how to play volleyball,” Luciano said.

- Yes, no one has any idea how to play volleyball, we just need one more person to form a team, - the guys answered.



In the team, only the captain was a professional. He explained that the player in the outfield passes the ball to the player in the center, he passes the ball to the player under the net, who in turn sends the ball to the opponent's side. This is Best Practice, so play Pro.



The game started, the team acted according to the instructions and eventually began to lose.



The reality was that no one except the captain knew how to play well enough, and often during passes the team lost the ball - it fell to the ground, and the move passed to the opponent.



Luciano put together a team.



- Let's stop pretending we're Pro - we don't really know how to play professionally! Let's immediately throw the ball to the side of the opponent without passing it inside - just as we did long ago at school!



And it worked! It wasn't Best Practice, but this tactic was best suited to the situation and the team they had. And in the end it led to victory.



This little story is also significant for the Python world. You need to understand that Python is used by a lot of people who are not professional developers - these are physicists, biologists, sociologists and others. It is necessary that the tool does not require them to perform Best Practice, but allows them to solve an urgent task. And Python allows it.



Luciano is very fond of programming. He started learning Python 20 years ago and has taught it to many other people since then. Luciano found that because Python is so easy to learn, sometimes people don't even read the entire tutorial. Because of this, sometimes, when reading someone else's code, you can find that a person writes Java code in Python or Ruby code in Python, that is, he tries to repeat in another language what he is used to. Luciano created the Python for Those Who Know Python course. After that, he spoke a lot on the topic of how to do certain things in the pythonic way. And so the book was born.



The book became very successful both in the world and for Luciano himself: he got a job at ThoughtWorks. He really wanted to work there, but he did not dare to send his resume to them because of the high requirements for candidates. After the book was published, they themselves came to him. Today, ThoughtWorks supports Luciano as a public speaker, just as it does Martin Fowler.



The Russian title for the book was suggested by Python core developer Yuri Selivanov . Luciano thinks this is a good translation of his book.



If you are serious about building a career as a Python developer, then this book is for you.



Why read books



I am deeply convinced that reading books is necessary for people of all ages. Not only professional literature, but also fiction. Books act on a person like a whetstone acts on a saber - they add sharpness to knowledge.



Stephen R. Covey calls this "sharpening the saw" in his book The 7 Habits of Highly Effective People. This skill is your personal resources and means. He supports and develops your most valuable resource - yourself.



"How do you learn new things?" - the question that I usually ask candidates in interviews. The answer to it is really important to me, and here it is not enough for me to hear about reading articles, watching videos on YouTube or listening to podcasts. Only books give knowledge structure, without breaks and with full context, leading the reader to enlightenment.



To paraphrase Anton Ptushkin, I will say: "Read it, it's worth it!"



PS The list of books that we discussed today does not claim to be complete. If you think that there is a book that is no less worthy to take its place in the ranking, then I invite you to join the Trello board, where we - the Russian community of Python developers - form our own rating of books on Python development. Make yourself at home - vote for existing ones, add new books or entire categories!



PPS Still have questions? Look for me on the web: slavabezborodov.com



All Articles