---
title: "flupy | pypx"
description: "Fluent data processing in Python - a chainable stream processing library for expressive data manipulation using method chaining"
canonical_url: "https://pypx.app/packages/flupy"
meta:
  "og:description": "Fluent data processing in Python - a chainable stream processing library for expressive data manipulation using method chaining"
  "og:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_flupy%2Cversion_1.2.5%2Csummary_Fluent%2Bdata%2Bprocessing%2Bin%2BPython%2B-%2Ba%2Bchainable%2Bstream%2Bprocessing%2Blibrary%2Bfor%2Bexpressive%2Bdata%2Bmanipulation%2Busing%2Bmethod%2Bchaining%2Clicense_MIT%2Cp_Ii9wYWNrYWdlcy9mbHVweSI%2Cs_QHTe-K1ojg_2X6xl.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "flupy 1.2.5"
  "twitter:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_flupy%2Cversion_1.2.5%2Csummary_Fluent%2Bdata%2Bprocessing%2Bin%2BPython%2B-%2Ba%2Bchainable%2Bstream%2Bprocessing%2Blibrary%2Bfor%2Bexpressive%2Bdata%2Bmanipulation%2Busing%2Bmethod%2Bchaining%2Clicense_MIT%2Cp_Ii9wYWNrYWdlcy9mbHVweSI%2Cs_QHTe-K1ojg_2X6xl.png"
---

> Index of every page on this site: [llms.txt](https://pypx.app/llms.txt)

# **flupy**

v1.2.5

Fluent data processing in Python - a chainable stream processing library for expressive data manipulation using method chaining

13 KB Python 3.10+ py3-none-anyMIT

[** Diff **](https://pypx.app/packages/flupy/diff)

`$ uv add flupy`

# flupy

---

**Documentation**: https://flupy.readthedocs.io/en/latest/

**Source Code**: https://github.com/olirice/flupy

---

## Overview

Flupy implements a [fluent interface](https://en.wikipedia.org/wiki/Fluent_interface) for operating on python iterables. All flupy methods return generators and are evaluated lazily. This allows expressions to transform arbitrary size data in extremely limited memory.

You can think of flupy as a light weight, 0 dependency, pure python alternative to the excellent [Apache Spark](https://spark.apache.org/) project.

## Setup

### Requirements

- Python 3.10+

### Installation

Install flupy with pip:

```
$ pip install flupy
```

### Library

```
from itertools import count
from flupy import flu

# Processing an infinite sequence in constant memory
pipeline = (
    flu(count())
    .map(lambda x: x**2)
    .filter(lambda x: x % 517 == 0)
    .chunk(5)
    .take(3)
)

for item in pipeline:
  print(item)

# Returns:
# [0, 267289, 1069156, 2405601, 4276624]
# [6682225, 9622404, 13097161, 17106496, 21650409]
# [26728900, 32341969, 38489616, 45171841, 52388644]
```

### CLI

The flupy command line interface brings the same syntax for lazy piplines to your shell. Inputs to the `flu` command are auto-populated into a `Fluent` context named `_`.

```
$ flu -h
usage: flu [-h] [-f FILE] [-i [IMPORT [IMPORT ...]]] command

flupy: a fluent interface for python

positional arguments:
  command               flupy command to execute on input

optional arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  path to input file
  -i [IMPORT [IMPORT ...]], --import [IMPORT [IMPORT ...]]
                        modules to import
                        Syntax: <module>:<object>:<alias>
                        Examples:
                                'import os' = '-i os'
                                'import os as op_sys' = '-i os::op_sys'
                                'from os import environ' = '-i os:environ'
                                'from os import environ as env' = '-i os:environ:env'
```

## **Details **

<dl>

<dt>Version</dt>
<dd>1.2.5</dd>

<dt>License</dt>
<dd>MIT</dd>

<dt>Python</dt>
<dd>&gt;=3.10</dd>

<dt>Maintainer</dt>
<dd>Oliver Rice &lt;flupy@oliverrice.com&gt;</dd></dl>

## **Links**

- [Documentation](https://flupy.readthedocs.io)
- [Repository](https://github.com/olirice/flupy)
- [View on PyPI](https://pypi.org/project/flupy/)

## **Release Cadence **

**2**

releases in the past year

avg 70 days between releases

## **Maintainers **

- Oliver Rice · [flupy@oliverrice.com](mailto:flupy@oliverrice.com)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://pypx.app/#website","@type":"WebSite","description":"The Python Package Index, reimagined. Fast search, dependency insights, download trends, and changelogs — all in one place.","name":"pypx","url":"https://pypx.app/"},{"@id":"https://pypx.app/packages/flupy#webpage","@type":"WebPage","description":"Fluent data processing in Python - a chainable stream processing library for expressive data manipulation using method chaining","name":"flupy","url":"https://pypx.app/packages/flupy","isPartOf":{"@id":"https://pypx.app/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://pypx.app/packages/flupy"]}]},{"@id":"https://pypx.app/packages/flupy#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"DeveloperApplication","description":"Fluent data processing in Python - a chainable stream processing library for expressive data manipulation using method chaining","license":"MIT","name":"flupy","softwareVersion":"1.2.5"}]}
```

## Sitemap

See the full [sitemap](https://pypx.app/sitemap.md) for all pages.
