Skip to content

Commit

Permalink
Add __iter__ to Aggify
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadkhalaj committed Nov 1, 2023
1 parent 18a1c0a commit fab2ea3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aggify/aggify.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def __init__(self, base_model: Type[Document]):
self.stop = None
self.q = None

def __iter__(self):
# Return a generator or iterator for the data you want to represent as a list
return iter(self.pipelines)

@last_out_stage_check
def project(self, **kwargs: QueryParams) -> "Aggify":
"""
Expand Down

0 comments on commit fab2ea3

Please sign in to comment.