Module Expr Str ImportFrom alias FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore ListLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults Str body If Call NameLoad NameLoad body Return Call NameLoad NameLoad Str orelse Return Lambda arguments args NameParam defaults Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore ListLoad Assign NameStore ListComp NameLoad comprehension TupleStore NameStore NameStore NameStore NameLoad CompareNotIn NameLoad NameLoad If NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assert Call NameLoad NameLoad Str Return NameLoad decorator_list Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign NameStore NameLoad TryExcept body For NameStore NameLoad body Expr Yield NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareIs NameLoad NameLoad body Raise Expr Call NameLoad NameLoad NameLoad Raise NameLoad decorator_list If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad keyword NameLoad For NameStore Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareIs NameLoad NameLoad body Raise Assign NameStore Call NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Break If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad For NameStore Call NameLoad NameLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num NameLoad body Expr Yield NameLoad Break If NameLoad body Expr Yield NameLoad decorator_list Return TupleLoad NameLoad NameLoad NameLoad decorator_list
N/A N/A  [=|Pipeless|=]
Simple pipelines building framework in Python, by Andy Chase.

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.
 types GeneratorType pipeline N/A N/A error_func use_builders N/A None False N/A N/A  Pipeline
    Takes:

    - (Optional, Default: None) A function to run on errors that
      takes an errored_item and an exception as inputs.

      If a result other than None is returned, result
      continues in the pipeline. If None, pipeline
      exceptions are raised (useful for debugging).
      Example: error_function(errored_item, exception)

    - (Optional, Default: False) A True/False on whether you want the pipeline
      to be built using function builders or just the pipeline functions directly.

    Outputs:

    - function_annotator
      ^- Annotate your pipeline functions with this in order in which they should run.
      The pipeline functions should generate and return (a function that takes 1 item,
      and returns None, 1 item, or yields many items).
      `` def fn(): return lambda item: item + 1 ``

    - master_runner(item_generator)
      ^- Takes a generator or list of items and creates a generator out of them.
      Optional arguments ```functions_to_run``` and ```function_groups_to_skip```

    - functions_list
      ^- A list of tuples containing your functions as (group, name, function_builder).
      You can ignore this one if you like.

    >>> function, run, _ = pipeline(lambda item, e: None)
    >>> @function
    ... def forwards_and_backwards(_):
    ...     yield _
    ...     yield _[::-1]
    >>> @function
    ... def title(_): return _.title()
    >>> list(run([-1, 'tool', 'flow', 'bat']))
    ['Tool', 'Loot', 'Flow', 'Wolf', 'Bat', 'Tab']
     N/A functions_list N/A add_func N/A N/A func group N/A N/A N/A  Functions_list is a list of tuples to maintain order.
            Originally it was an OrderedDict, but that became out of order
            when you did group1 group2 group1.
         N/A N/A N/A functions_list append N/A group N/A func __name__ func N/A func N/A function_annotator N/A N/A group N/A N/A N/A N/A callable group N/A N/A N/A add_func group N/A N/A N/A N/A N/A func N/A N/A add_func func group N/A get_functions_to_run N/A N/A functions function_groups_to_skip N/A functions_list None N/A N/A N/A function_groups_to_skip None N/A N/A function_groups_to_skip N/A N/A functions_to_run N/A fn N/A N/A group _ fn functions N/A group function_groups_to_skip N/A use_builders N/A build N/A N/A fn N/A N/A N/A fn N/A fn N/A N/A callable fn Pipeless annotated functions should build a function when use_builders=True N/A fn N/A N/A functions_to_run N/A N/A build fn N/A fn functions_to_run N/A functions_to_run N/A run_pipeline N/A N/A item_generator functions_to_run function_groups_to_skip N/A None None None N/A safe_source N/A N/A source error_func N/A N/A N/A item None N/A N/A N/A item source N/A N/A N/A item N/A N/A N/A Exception N/A e N/A N/A N/A error_func None N/A N/A N/A N/A error_func item e N/A StopIteration N/A N/A N/A functions_to_run None N/A N/A functions_to_run N/A get_functions_to_run function_groups_to_skip function_groups_to_skip N/A item N/A safe_source item_generator error_func N/A N/A should_yield True N/A N/A fn_num function N/A enumerate functions_to_run N/A N/A N/A N/A item N/A function item N/A N/A N/A Exception N/A exception N/A N/A N/A error_func None N/A N/A N/A item N/A error_func item exception N/A N/A item None N/A N/A should_yield False N/A N/A N/A isinstance item GeneratorType N/A N/A should_yield False N/A i N/A run_pipeline item N/A functions_to_run N/A N/A fn_num 1 function_groups_to_skip N/A N/A N/A i N/A N/A should_yield N/A N/A N/A item N/A N/A N/A function_annotator run_pipeline functions_list N/A