Book Image

Daniel Arbuckle's Mastering Python

By : Daniel Arbuckle
Book Image

Daniel Arbuckle's Mastering Python

By: Daniel Arbuckle

Overview of this book

Daniel Arbuckle's Mastering Python covers the basics of operating in a Python development environment, before moving on to more advanced topics. Daniel presents you with real-world solutions to Python 3.6 and advanced-level concepts, such as reactive programming, microservices, ctypes, and Cython tools. You don't need to be familiar with the Python language to use this book, as Daniel starts with a Python primer. Throughout, Daniel highlights the major aspects of managing your Python development environment, shows you how to handle parallel computation, and helps you to master asynchronous I/O with Python 3.6 to improve performance. Finally, Daniel will teach you the secrets of metaprogramming and unit testing in Python, helping you acquire the perfect skillset to be a Python expert. Daniel will get you up to speed on everything from basic programming practices to high-end tools and techniques, things that will help set you apart as a successful Python programmer.
Table of Contents (13 chapters)

Using venv to create a stable and isolated work area

When we're working on a project, we usually like the parts of the project that aren't our own code to stay the same. We might have a good reason to install a new version of Python or updated library on our system, but we don't really want those things to change within our development environment. Even more so, we can easily find ourselves targeting entirely different and incompatible system configurations with different projects. We need a way to set aside an area for each project that is separate and can be configured for the specific needs of that project. That's what we call a virtual environment.

The venv tool that's built in to Python 3.3, and later, creates a virtual environment for us. Each virtual environment created by venv knows which version of Python it should be using and has its own package...