skillfed

pipe

Module enabling a sh like infix syntax (using pipes)

pipe v2.2 111.2K downloads/30d#12,425 on PyPI2,106
Permissive license MIT License AGING released

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 pipe

uv

uv add pipe

poetry

poetry add pipe

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python Modules

Tags

infix operator chaining iterableslazy evaluation pipeline syntaxfunctional composition with pipesshell-like data transformationiterable stream processingfilter map chain operationspython pipe operator syntax
functional-programmingdata-pipelinelazy-evaluation

More Software Development packages