pipe
Module enabling a sh like infix syntax (using pipes)
What it is and what it does
Pipe is a Python library that brings shell-like infix syntax to iterable operations by overloading the `|` operator. Instead of nested function calls, you write transformations in a left-to-right pipeline: `data | filter_fn | map_fn | take(n)`. Each pipe operation is lazy-evaluated, meaning computation happens only when needed, and pipes can be aliased and partially initialized for reuse.
The library provides a collection of composable operations—select (map), where (filter), take, skip, groupby, dedup, transpose, traverse, and many others—that work on any iterable. It's useful for data processing tasks where readability and functional composition matter more than raw performance, and it integrates naturally with Python's itertools and generator patterns.
Use it for:
- Process sequences of data with readable, left-to-right transformations instead of nested function calls or list comprehensions.
- Solve algorithmic problems (like Project Euler) by chaining filters and transformations on infinite generators.
- Debug multi-stage data pipelines by inserting the `tee` pipe to inspect intermediate values without breaking the chain.
- Build reusable, aliased pipes for common filtering or transformation patterns in data processing workflows.
- Flatten or traverse nested iterables recursively using the `traverse` pipe for complex data structures.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pipe enables shell-like infix syntax for chaining operations on iterables using the `|` operator, providing lazy-evaluated transformations like filtering, mapping, grouping, and slicing.
Yes, if you value readable, functional-style data pipelines and work frequently with iterables. The library is stable, has no dependencies, and installs easily. However, maintenance is aging (last release April 2024, no recent commits), so consider it for stable use cases rather than as a foundation for mission-critical infrastructure. Not worth installing if you prefer standard Python idioms (list comprehensions, itertools) or need active development support.
Install
pipe on PyPI
pip
pip install pipeuv
uv add pipepoetry
poetry add pipeInstalling pipe
Before you install
Low install friction; pure Python wheel with no runtime dependencies. Maintenance status is aging—last release was 2024-04-04 and the repository shows no recent activity, though it remains archived=false and the package is marked Production/Stable.
License in practice
MIT License (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
from pipe import where, take_while
from itertools import count
result = sum(count() | where(lambda x: x % 2 == 0) | take_while(lambda x: x < 100))
Requires Python 3.8 or later.
Verify before relying
- Whether the package is actively maintained or in maintenance-only mode (last commit 2025-03-23 but no recent releases).
- Performance characteristics when chaining many pipes or working with very large iterables.
- Compatibility with third-party libraries that may override or conflict with the `|` operator.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 862 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 111,231/month — #12,425 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pipe-2.2-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
flupyFlupy provides a fluent interface for lazy…
permissive · top 5,000 on PyPI
iterproxyWraps any iterable object to provide ORM-style…
permissive · top 5,000 on PyPI
lmzProvides convenience functions for mapping,…
copyleft · top 15,000 on PyPI
nr-streamProvides functional-style utilities for Python…
permissive · top 15,000 on PyPI
maybe-elseWraps values in a `Maybe` class to handle None…
permissive · top 15,000 on PyPI
sargeSarge wraps Python's subprocess module to…
permissive · top 15,000 on PyPI
ExpressionExpression provides functional programming…
permissive · top 5,000 on PyPI
aiostreamaiostream provides composable stream operators…
copyleft · top 5,000 on PyPI
firstReturns the first true value from an iterable,…
permissive · top 15,000 on PyPI
plumbumPlumbum lets you write shell-script-like…
permissive · top 5,000 on PyPI