You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to check in and see if the maintainers thought it would be a good feature to add to uplink. The idea is that you can specify a requests/time period and the consumer would never make request faster than that. It would be up to the user to specify a rate somewhat lower than the actual limit for the api they're wrapping. I could see an issue that would make it unnecessary to add this feature, being that you can only limit the requests a for a single instance. Just wanted to put it up for consideration.
The text was updated successfully, but these errors were encountered:
The ratelimit decorator should be available in v0.8.0. After I merge #132, I'll create a new alpha release v0.8.0a1 in case you wan't to try it out before the official release. To install this alpha release with pip, do:
$ pip install --pre uplink
Here's some documentation for the decorator. (I'll also be soon adding a section to the quickstart about this feature). Notably, this decorator can be used like the other decorators, such as @timeout or @headers:
classGitHub(uplink.Consumer):
@uplink.ratelimit(calls=15, period=900) # limit of 15 calls every 15 minutes@uplink.get("/users/{user}")defget_user(self, user):
pass
If you get the chance to try it out, let me know if you also have any feedback!
I wanted to check in and see if the maintainers thought it would be a good feature to add to uplink. The idea is that you can specify a requests/time period and the consumer would never make request faster than that. It would be up to the user to specify a rate somewhat lower than the actual limit for the api they're wrapping. I could see an issue that would make it unnecessary to add this feature, being that you can only limit the requests a for a single instance. Just wanted to put it up for consideration.
The text was updated successfully, but these errors were encountered: