Skip to main content

callables and components joined in one big happy chain

Project description

Lets arbitrary callables, components, and event listeners be stringed into one lazily evaluated processing chain.

Some highly contrived examples:

chain style:

>>> from callchain import aachainq as chainq
>>> chainqueue = chainq()
>>> chainqueue(('a', 1), ('b', 2), ('c', 3)).reup().wrap(dict).map().value()
{'a': 1, 'b': 2, 'c': 3}

Object-oriented style:

>>> chainqueue(('a', 1), ('b', 2), ('c', 3))
>>> chainqueue.reup()
>>> chainqueue.wrap(dict)
>>> chainqueue.map()
>>> chainqueue.value()
{'a': 1, 'b': 2, 'c': 3}

Mirrored at https://github.com/lcrees/callchain/

Project details


Download files

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

Source Distributions

callchain-0.2.6.zip (57.8 kB view hashes)

Uploaded Source

callchain-0.2.6.tar.gz (30.5 kB view hashes)

Uploaded Source

callchain-0.2.6.tar.bz2 (23.0 kB view hashes)

Uploaded Source

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