-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
There is no elegant way to implement throttling for github API calls through PyGitHub. The best way I can find to make sure my app doesn't hit the throttling limits is to keep checking before every call, and maintain a count of the number of calls made to the APIs, and then continuously checking if that limit is reached or not - while refreshing the rate limits periodically. It is not simple to implement a wrapper class, or apply decorators/descriptors to the calls because there various classes (like GitHub, Repository, Releases etc) that can make a call to the API endpoint. It seems implementing this feature inside PyGitHub to help throttle/ratelimit/wait calls would be the best approach IMO, since every call the the REST API can be tracked. Will such a feature be encouraged? Does it make sense to work on a pull request?