Is there a library or recommended way for creating an iterator pipeline in Python?
For example:
>>>all_items().get("created_by").location().surrounding_cities()
I also want to be able to access attributes of the objects in the iterators. In the above example, all_items() returns an iterator of items, and the items have different creators.
The .get("created_by") then returns the "created_by" attribute of the items (which are people), and then location() returns the city of each person, and then pipes it to surrounding_cities(), which returns all an iterator of the surrounding cities for each location (so the end result is a large list of surrounding cities).