更新时间:2021-06-24 18:26:09
coverpage
Title Page
Dedication
Packt Upsell
Why subscribe?
Packt.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
An Introduction to Reactive Programming
What is reactive programming?
Event-driven programming
Reactive versus proactive
Reactor and proactor
Reactive systems
Introduction to ReactiveX and RxPY
ReactiveX principles
Operators
Installating RxPY
A reactive echo application
Marble diagrams
The map operator
The from_ operator
Flow diagrams
Reactivity diagrams
Reactivity diagram elements
Reactivity diagrams of an echo example
Summary
Questions
Further reading
Asynchronous Programming in Python
What is asynchronous programming?
The history of asynchronous programming in Python
Asynchronous handlers with callbacks
Asynchronous handlers with generators
Understanding generators
Using generators for asynchronous handlers
Introduction to AsyncIO
Futures
Coroutines
Event loop
An HTTP echo server
aiohttp
An AsyncIO HTTP server
Functional Programming with ReactiveX
What is functional programming?
Some base elements of functional programming
Lambdas
Closures
Side effects and pure functions
Higher-order functions
Functional reactive programming
Observable cycles
The observable cycle issue
ReactiveX Subject
Solving the cycle issue with Subject
Structuring functional and reactive code
The HTTP echo server with an HTTP driver
ReactiveX operators
The empty operator
The merge operator
Implementation of the HTTP server driver
Bootstrapping the event loop
Adding the program logic
Exploring Observables and Observers
Creating observables
Creating observables from values
The of operator
The just operator
The range operator
The repeat operator
The never and throw operators
Observables driven by time
The timer operator
The interval operator
Custom observables
The from_callback operator
The create operator
Hot and cold observables
Operators – publish and connect
Operators – ref_count and share
Subscription and disposal
Subscribing to an observable
Disposing a subscription
Custom disposal