Book Image

Mastering Python

By : Rick van Hattem
Book Image

Mastering Python

By: Rick van Hattem

Overview of this book

Python is a dynamic programming language. It is known for its high readability and hence it is often the first language learned by new programmers. Python being multi-paradigm, it can be used to achieve the same thing in different ways and it is compatible across different platforms. Even if you find writing Python code easy, writing code that is efficient, easy to maintain, and reuse is not so straightforward. This book is an authoritative guide that will help you learn new advanced methods in a clear and contextualised way. It starts off by creating a project-specific environment using venv, introducing you to different Pythonic syntax and common pitfalls before moving on to cover the functional features in Python. It covers how to create different decorators, generators, and metaclasses. It also introduces you to functools.wraps and coroutines and how they work. Later on you will learn to use asyncio module for asynchronous clients and servers. You will also get familiar with different testing systems such as py.test, doctest, and unittest, and debugging tools such as Python debugger and faulthandler. You will learn to optimize application performance so that it works efficiently across multiple machines and Python versions. Finally, it will teach you how to access C functions with a simple Python call. By the end of the book, you will be able to write more advanced scripts and take on bigger challenges.
Table of Contents (22 chapters)
Mastering Python
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
6
Generators and Coroutines – Infinity, One Step at a Time
Index

About the Reviewers

Randall Degges is a happy programmer, speaker, author, and amateur bodybuilder living in California.

Growing up in Los Angeles, he was intensely interested in building command-line programs and writing quality software. His love of programming eventually propelled him into a successful career in software development.

Randall has been a life-long open source developer and has contributed to hundreds of popular projects in Python, Node.js, and Go. He's also the author of several popular libraries, which you can find on his public GitHub account at https://github.com/rdegges.

At 23, he cofounded an extremely popular API service in the telephony industry: OpenCNAM (https://www.opencnam.com). At 25, he joined Stormpath (https://stormpath.com) as the head of developer evangelism, whereby he writes open source security libraries full time and travels the world giving technical talks about building secure software.

In his free time, Randall writes and edits technical books, runs a security podcast called Stormcast (https://www.stormca.st), posts blogs on his personal website (https://www.rdegges.com), and tries to spend time with his high-school sweetheart, Samantha.

Dave de Fijter is a Python developer from the Netherlands. He always knew he would end up "doing something with computers." At a young age, he went to the library to read books about them even though he had no computer at that time. This obsession never really ended. In 2001, aged 14, he started his first part-time job, creating dynamic websites in PHP for a local web development company, and there he found his calling.

In 2007, he finished his bachelor's degree in ICT while already working full time as a PHP developer for over a year. In 2008, he switched from PHP to Python and Django for web development and loved this new technology stack so much that he never looked back.

After working as a Python developer for various start-ups and established companies, Dave used this experience to start his own business called Indentity (https://indentity.nl) in 2010, focusing on Python/Django development and advice. Up until now, he runs this company and mainly spends his time helping out start-ups with designing and building technologically advanced web applications from the ground up as an interim CTO/technical cofounder.

I. de Hoogt, with some basic experience wrought from university assignments in the field of modeling of multi-phase flows, got himself started in software development. His main experience in programming in Python stems from an internship at a company dealing in 3D printing software, where a package resulting in optimized object orientation and guaranteed mathematical mesh validity was created.

Other projects that he's been involved with have dealt with control systems such as self-parking cars, multi-legged robots, and quadcopters, but his current job is in the field of data analysis.