Simple pipeline building framework
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
A simple library for building a data pipeline.
It's an advanced version of this:
It looks like this:
.. code-block:: python
from pipeless import pipeline
error_handler = lambda item, exception: None function, run, _ = pipeline(error_handler)
@function def add_one(_): return _ + 1
list(run([1, 2, 3])) # [2, 3, 4]
@function def doubler(_): yield _ yield _ * 2
list(run([1, 2, 3])) # [2, 4, 3, 6, 4, 8]
+-----------------------------------+ | | | add_one doubler | | --|-2----\-----2 | | Input -----4 | | Output [2,4] | | | +-----------------------------------+
error_handlerinput argument to prevent one broken item from stopping the flow. If the handler returns something, that something continues on down the pipeline.
@function('my_group'). Set up your functions this way and you can skip groups with the
function_groups_to_skipargument on the pipeline runner.
See the docstrings in
pipeline.pyfor more information!
Supports Python 2.6, 2.7, 3.x, pypy.
.. code-block:: bash
pip install pipeless
pipeless.pyinto your project.
Need some help? Send me an email at [email protected]m and I'll do my best to help you.
Send me suggestions, issues, and pull requests on Github and I'll gladly review them!
The MIT License (MIT)
Copyright (c) 2013 Andrew Chase
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.. |Build Status| image:: https://travis-ci.org/andychase/pipeless.svg?branch=master :target: https://travis-ci.org/andychase/pipeless