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.7.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

nutsflow-1.0.7-py2-none-any.whl (35.3 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for nutsflow-1.0.7.tar.gz
Algorithm Hash digest
SHA256 274d925121857142d0057bb9476d15c079ce88a21934fa230a21d0663c1caf75
MD5 db7ee0f7faa3133c76838967c96de8e1
BLAKE2b-256 68a719a21457782f9d3c24c144f0fd7e5108fb8ab42ec28edaf7cded9006c6e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nutsflow-1.0.7-py2-none-any.whl
Algorithm Hash digest
SHA256 ac3e367d33c6e1acd3d52ae3356f601d4b1eb834b7013ac6cbec9028dedebfbe
MD5 740b71394f9ddeffd04c47afc833bc68
BLAKE2b-256 4921525f52e47effcee3836120d3bb4147c282009fd4a0050d1685256761b8b0

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