def ratelimit_remaining ( self ) : json = self . _json ( self . _get ( self . _github_url + '/rate_limit' ) , 200 ) core = json . get ( 'resources' , { } ) . get ( 'core' , { } ) self . _remaining = core . get ( 'remaining' , 0 ) return self . _remaining
python how to avoid hitting api limit
Number of requests before GitHub imposes a ratelimit .
def ratelimit_remaining(self):
        """Number of requests before GitHub imposes a ratelimit.

        :returns: int
        """
        json = self._json(self._get(self._github_url + '/rate_limit'), 200)
        core = json.get('resources', {}).get('core', {})
        self._remaining = core.get('remaining', 0)
        return self._remaining