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)

The concept of reactive programming

There are a lot of different and valid ways that I could define reactive programming. It's a matter of perspective and focus. Which of them is the best definition? We're going to cover several in this section.

Perhaps, the most fundamental definition of reactive programming, at least in terms of what we need to think about to implement a reactive programming system, is that it's a publish/subscribe model of event handling. The following diagram illustrates the basic reactive event handling:

In the traditional nomenclature of reactive programming, there are observables and observers, which encapsulate the behavior of event publishers and event subscribers, respectively. In a reactive programming system, everything, or at least as much as possible, is an observable or an observer. So far, so good, but the publish/subscribe model...