Книга: Learning Concurrency in Python
Назад: Output
Дальше: Installation and official docs

PyFunctional

PyFunctional is a library that's worth noting at this point as it follows a similar paradigm to that of reactive programming. It essentially enables us to create functional programs using the Python programming language.

Both functional and reactive programming tend to utilize pure functions that feature no side effects and store no additional state. We define functions that will always return the same results regardless of what else is happening within our programs. The key difference between both PyFunctional and RxPY is the fact that while we handle streams in a very similar fashion in both libraries, the way that this data is handled is somewhat different. RxPY is far more focused on the way that data and subsequently events are handled within systems. PyFunctional is more focused on the transformation of data using functional programming paradigms.

PyFunctional is specifically useful as it allows us to easily create data pipelines using chained functional operators. The library was originally conceived by a PhD student in AI called Pedro Rodriguez and draws inspiration from both Spark and Scala and tries to enable us to write very elegant code using LINQ style chained operators in order to easily manipulate our data streams.

Назад: Output
Дальше: Installation and official docs