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

Question: Is this throttler composable/chainable? #5

Open
dossy opened this issue Jul 25, 2024 · 0 comments
Open

Question: Is this throttler composable/chainable? #5

dossy opened this issue Jul 25, 2024 · 0 comments

Comments

@dossy
Copy link

dossy commented Jul 25, 2024

Is this throttler composable/chainable? Can I wrap one in another?

In other words: Can I use this in some layered fashion that implements both a N per second throttle but also a M per minute throttle?

For example: No more than 3 concurrent requests per second and no more than 100 requests per minute.

I think the answer is "no" but maybe there's a clean way of combining/layering/composing this that could yield such functionality?

I love how simple this implementation is and I don't want to complicate it with such features, but if a chain of these can be used to implement such functionality, that would be awesome. I'm just not experienced enough at Python to see how to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant