This reminds me a lot of reactive programming like ReactiveX [http://reactivex.io] which has a python implementation
I think this is the most popular one:
https://github.com/ReactiveX/RxPY
This one is a rewrite of RxPY, that makes use of async / await / asyncio:
https://github.com/dbrattli/aioreactive
Pretty interesting stuff!