Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nutsflow-1.0.5.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

nutsflow-1.0.5-py2-none-any.whl (34.8 kB view details)

Uploaded Python 2

File details

Details for the file nutsflow-1.0.5.tar.gz.

File metadata

  • Download URL: nutsflow-1.0.5.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nutsflow-1.0.5.tar.gz
Algorithm Hash digest
SHA256 f1358a43bf869f878b020f4777630aa1d1df707001e2b388ee1aebca12dd3e22
MD5 3333c87966f0d73590bb3def500b2f2d
BLAKE2b-256 86ead724317a01cc5b6ffda8798d72c4354628b7c810d682a2a14226c99a58bb

See more details on using hashes here.

File details

Details for the file nutsflow-1.0.5-py2-none-any.whl.

File metadata

File hashes

Hashes for nutsflow-1.0.5-py2-none-any.whl
Algorithm Hash digest
SHA256 0777a3e6216d57e1c1de8040daf25e33b291ca677bf8316128da3d5bae086949
MD5 1930f139b75c6bf01abb54f22fecc660
BLAKE2b-256 2a2509ec0b700c5167544743028ec68a5f7e0fe33624d96cec7146baf90ee6d8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page