pyparallelcurl icon indicating copy to clipboard operation
pyparallelcurl copied to clipboard

Feature request: rate limit

Open conradlee opened this issue 13 years ago • 2 comments

I sometimes use this library for making API calls to web services. Such APIs often have rate limits, such as one request/second. It would be nice if I could specify this limit for pyparallelcurl. While I can already set the maximum number of simultaneous requests, this is not the same thing as the maximum number of requests started in any given second.

conradlee avatar Jun 24 '11 12:06 conradlee

That is something that has come up before, I'd like to see it in there too. I'll see how much work it will be next time I'm working on the code, though I don't know when that will be. Feel free to send me a patch if you get the itch to add it too!

On Fri, Jun 24, 2011 at 5:59 AM, conradlee < [email protected]>wrote:

I sometimes use this library for making API calls to web services. Such APIs often have rate limits, such as one request/second. It would be nice if I could specify this limit for pyparallelcurl. While I can already set the maximum number of simultaneous requests, this is not the same thing as the maximum number of requests started in any given second.

Reply to this email directly or view it on GitHub: https://github.com/petewarden/pyparallelcurl/issues/1

petewarden avatar Jun 24 '11 19:06 petewarden

I've added a simple rate limiter to the branch located here

https://github.com/conradlee/pyparallelcurl

I don't have much experience with git, and have none with working with other people on github, so I'm not sure how to properly show you a patch of the changes that I've made---maybe this is clear to you?

I tested this out a little and it seems to work, but I'll be using it more in the near future and so I'll let you know if I run into any bugs.

Conrad

On Fri, Jun 24, 2011 at 9:19 PM, petewarden < [email protected]>wrote:

That is something that has come up before, I'd like to see it in there too. I'll see how much work it will be next time I'm working on the code, though I don't know when that will be. Feel free to send me a patch if you get the itch to add it too!

On Fri, Jun 24, 2011 at 5:59 AM, conradlee < [email protected]>wrote:

I sometimes use this library for making API calls to web services. Such APIs often have rate limits, such as one request/second. It would be nice if I could specify this limit for pyparallelcurl. While I can already set the maximum number of simultaneous requests, this is not the same thing as the maximum number of requests started in any given second.

Reply to this email directly or view it on GitHub: https://github.com/petewarden/pyparallelcurl/issues/1

Reply to this email directly or view it on GitHub: https://github.com/petewarden/pyparallelcurl/issues/1#issuecomment-1434553

conradlee avatar Jun 25 '11 15:06 conradlee