Skip to main content

flupy

Tests Codestyle Black

Python version PyPI version License Download count


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

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


Overview

Flupy implements a 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 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'

Metadata

Release files for flupy 1.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flupy 1.2.4
File Size Uploaded
flupy-1.2.4.tar.gz 82.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flupy 1.2.4
File Interpreter ABI Platform
flupy-1.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 95.4 kB

Release files / flupy-1.2.4.tar.gz

Download URL flupy-1.2.4.tar.gz
Size 82.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dad657113e4a271a322229dc2926c5154d4a926c6ba8154b604f7e9cdda5c3e6
BLAKE2b-256 checksum
How to use checksums
a1c2b5f13c19d214c1b419aadb1752650caed4f9dc6a978d294213c1d6f776db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / flupy-1.2.4-py3-none-any.whl

Download URL flupy-1.2.4-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
231192ded613ebde6d0435e9d1bf0e305cda3a5115be9a142ef368e3f5724f81
BLAKE2b-256 checksum
How to use checksums
f7346014ec505d5ae5183ee51dbb2a00ca1fe4ad3a9dfeef39fc665135df52fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

1.2.4 This release

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

1 release file

1.2.0

1 release file

1.1.9

1 release file

1.1.8

1 release file

1.1.7

1 release file

1.1.6

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.13

1 release file

1.0.12

1 release file

1.0.11

1 release file

1.0.10

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page