Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.throttle: add param yields_per: Tuple[int, timedelta] #31

Open
ebonnal opened this issue Oct 13, 2024 · 0 comments
Open

.throttle: add param yields_per: Tuple[int, timedelta] #31

ebonnal opened this issue Oct 13, 2024 · 0 comments
Labels
feature New feature or request, modifies library API

Comments

@ebonnal
Copy link
Owner

ebonnal commented Oct 13, 2024

instead of

stream.throttle(per_second=50, per_minute=1000)

let's have

(
    stream
    .throttle(yields=50, per=timedelta(seconds=1))
    .throttle(yields=1000, per=timedelta(minutes=1))
)
@ebonnal ebonnal added the feature New feature or request, modifies library API label Oct 13, 2024
@ebonnal ebonnal changed the title .throttle: make them more generic as .throttle(interval, yields) and meant to be chained .throttle: make it more generic as .throttle(interval, yields) and meant to be chained Oct 13, 2024
@ebonnal ebonnal changed the title .throttle: make it more generic as .throttle(interval, yields) and meant to be chained .throttle: make it more generic as .throttle(yields, per) and meant to be chained Oct 13, 2024
@ebonnal ebonnal changed the title .throttle: make it more generic as .throttle(yields, per) and meant to be chained .throttle: add param yields_per: Tuple[int, timedelta] Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request, modifies library API
Projects
None yet
Development

No branches or pull requests

1 participant