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

Uploaded Source

Built Distribution

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

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for nutsflow-1.0.4.tar.gz
Algorithm Hash digest
SHA256 396f9766d9879f0e7d97c9d49d272918ae3280258f4d67f2ece53fbf6b07d389
MD5 1beca92ee2801a4b8f4ba647025685b3
BLAKE2b-256 9824fbaf5901d439b5cae236236a55651d3d98552348ec8978d5d82a58f6074c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nutsflow-1.0.4-py2-none-any.whl
Algorithm Hash digest
SHA256 738fe320ef3af12b3f268dfa772843de06abebe847004ba1d9b1c1658ce75554
MD5 e16f35659083b7c1c4be18be0f6903d8
BLAKE2b-256 acb4bed4d8efdfd6cddbc80d8fdeb09ab56592ae14d4615680993b3c29534990

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