PyFunctional is a Python package designed for creating data pipelines using a functional programming paradigm, inspired by Scala and Spark. It provides tools for chaining operations on sequences, supporting lazy evaluation, parallel processing, and various data transformations. The current version is 1.5.0, and the project generally focuses on API stability since its 1.0.0 release.
Install & Compatibility
Where this runs
tested against v1.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.292s · 19.4MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 1.7s · import 0.273s · 20MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Use `seq` for standard, lazy functional pipelines.
from functional import seq
Use `pseq` for pipelines that automatically leverage parallel processing for performance.
from functional import pseq
This example demonstrates creating a sequence, applying common functional transformations like `map` and `filter`, and finally aggregating results with `reduce`.
from functional import seq
# Create a sequence from a range of numbers
result = seq(range(10))
.map(lambda x: x * x) # Square each number
.filter(lambda x: x > 10) # Keep numbers greater than 10
.reduce(lambda x, y: x + y, 0) # Sum the remaining numbers, starting with 0
print(result)
# Expected output: 285
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.