Welcome to iteration_utilities’s documentation!

iteration_utilities is a general purpose collection around the concept of functional programming based on and utilizing iterators and generators. Most of the functions presented here are inspired by the itertools module, especially the “recipes” section [0], but also by the toolz [1] package. It should be noted that there are lots more packages with similar functions, for example more-itertools [2], pydash [3] and many, many more.

Large fractions of the code are implemented in C to achieve very good overall performance. However this library cannot compete (intentionally) with specialized libraries like NumPy, pandas or SciPy.


The documentation also presents functionality from several built-in modules and functions to provide a general overview over the avaiable functionality.


This library is under on-going development and may change it’s API!


There are three classes providing a sequential functional interface for several built-in and additional functions:

And a complete list of all functionality provided in this package:

accumulate() all_distinct() all_equal() all_isinstance()
all_monotone() any_isinstance() applyfunc() argmax()
argmin() argsorted() chained() clamp()
combinations_from_relations() complement() constant() consume()
count_items() deepflatten() dotproduct() double()
duplicates() first() flatten() flip()
getitem() groupedby() grouper() InfiniteIterable()
insert() intersperse() ipartition() is_even()
is_iterable() is_None() is_not_None() is_odd()
ItemIdxKey() iter_except() Iterable() itersubclasses()
last() ManyIterables() merge() minmax()
ncycles() nth() one() packed()
pad() partial() partition() Placeholder()
PlaceholderType() powerset() radd() random_combination()
random_permutation() random_product() rdiv() reciprocal()
remove() repeatfunc() replace() replicate()
return_called() return_False() return_first_arg() return_identity()
return_None() return_True() rfdiv() rmod()
rmul() roundrobin() rpow() rsub()
second() Seen() sideeffects() split()
square() starfilter() successive() tabulate()
tail() tee_lookahead() third() unique_everseen()



Indices and tables