| from dataclasses import dataclass | |
| from typing import Callable, Optional | |
| class StreamOptions: | |
| delay: float = 0.3 | |
| limit: Optional[int] = None | |
| batch_size: int = 50 | |
| resume_file: Optional[str] = None | |
| # progress gets total_saved so far | |
| progress_callback: Optional[Callable[[int], None]] = None | |