-
Notifications
You must be signed in to change notification settings - Fork 200
Closed
Labels
Description
What is your feature request?
Any function that takes performs batching on results and automatically aggregates them (i.e., one that takes the container_size parameter) could benefit from firing a caller-specified callback function, which can be used for example to display progress updates to the user. This is particularly useful for calling e.g. section.searchTracks() and similar, which could potentially return many thousands of results.
Are there any workarounds?
None that I'm aware of.
Code Snippets
def show_progress(n_received: int: n_total: Optional[int]) -> None:
# Note: `n_total` may not always be available (sometimes `None`)
print(f"Received {n_received} / {n_total} items so far")
section.searchTracks(batch_callback=show_progress)Additional Context
No response