A simple data-flow framework based on iterator chaining
Project description
nuts-flow is largely a thin wrapper around itertools that allows the chaining of iterators using the >> operator. The aim is a more explict flow of data. The following examples show a simple data processing pipeline using Python’s itertools versus nuts-flow:
>>> from itertools import islice, ifilter >>> list(islice(ifilter(lambda x: x > 5, xrange(10)), 3)) [6, 7, 8]>>> from nutsflow import Range, Filter, Take, Collect, _ >>> Range(10) >> Filter(_ > 5) >> Take(3) >> Collect() [6, 7, 8]
Both examples extract the first three numbers within range [0, 9] that are greater than five. However, the nuts-flow pipeline is easier to understand than the nested itertools code.
Installation guide, API documentation and tutorials can be found here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nutsflow-1.0.1.tar.gz
.
File metadata
- Download URL: nutsflow-1.0.1.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf9e1148ba4d56482863ff4ef9509d406e2f2c8ac3f50f9e4445db3a62061754 |
|
MD5 | 87481ed4cdf9814cb6b49402a3f00a86 |
|
BLAKE2b-256 | 53177a2b2f82d5eaccac0926c6f3ec23861452caedfda4cf7f98dd1564bcced8 |
File details
Details for the file nutsflow-1.0.1-py2-none-any.whl
.
File metadata
- Download URL: nutsflow-1.0.1-py2-none-any.whl
- Upload date:
- Size: 33.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4056abb9959a6e55944e2b13964a8afb04f85a13b5a78c203f28f1e90c94aae |
|
MD5 | 5be6645d8de3937d37d8b83f58bca255 |
|
BLAKE2b-256 | d569ff1dcd2c58eb6582d10cb56d22664586df4103eb510ae76185dee4242936 |