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

Uploaded Source

Built Distribution

nutsflow-1.0.6-py2-none-any.whl (35.1 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for nutsflow-1.0.6.tar.gz
Algorithm Hash digest
SHA256 811506dacfbc1a3014305ae35008c19901cb7333c626385b8987e6ac2dbcb015
MD5 a9060ba2f00bb1a6a0cbd12017093962
BLAKE2b-256 c15c34d175cbb016bad3fecb7479bf5f15171e28808e36461d2f70dff2d39004

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nutsflow-1.0.6-py2-none-any.whl
Algorithm Hash digest
SHA256 890c93a76f9e2d8d9e1c62527a9ecaf4349cbbd865603a0aacc15575fb87c04e
MD5 ccf1f4857816d0db1c2f327125f398aa
BLAKE2b-256 df5ac6fb3207a9feee57b4804a8533850cd22e22ca2f18ac568b355ccda0c16d

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