我正在使用 python github3 模块,我需要设置对 github api 的请求之间的延迟,因为我的应用程序在服务器上产生了很多负载。
我正在做诸如
git = github3.GitHub()
for i in itertools.chain(git.all_repositories(), git.repositories(type='private')):
do things
我发现 GitHub 使用 requests 向 github api 发出请求。 https://github.com/sigmavirus24/github3.py/blob/3e251f2a066df3c8da7ce0b56d24befcf5eb2d4b/github3/models.py#L233
但是我不知道我应该传递什么参数或者我应该改变什么属性来设置请求之间的一些延迟。
你能给我一些建议吗?