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

Uploaded Source

Built Distribution

nutsflow-1.0.0-py2-none-any.whl (32.6 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for nutsflow-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8074fb4b95c893bcdb30f6370dab274a9464b1758a2f60166a85ef21386fea8e
MD5 7781b711e7b5c6d600c652bf37a081bf
BLAKE2b-256 2260ec1f3d090e052a98a2dd13c77afd606c9c68b6aaa9106f827a37ccf02316

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nutsflow-1.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 96761f073d81b5966c50568bf7a0c1dedd95bb1deececbcdcd6b0089f4b2d33f
MD5 79a2f628ae5173f1e23e80fb98282cf4
BLAKE2b-256 1224fafe517ba41fc8382fa2598d8e20df04754c61ea31149254de1a6458c647

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