
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Fluent data processing in Python - a chainable stream processing library for expressive data manipulation using method chaining
Documentation: https://flupy.readthedocs.io/en/latest/
Source Code: https://github.com/olirice/flupy
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.
Install flupy with pip:
$ pip install flupy
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]
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'
FAQs
Fluent data processing in Python - a chainable stream processing library for expressive data manipulation using method chaining
We found that flupy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.