Skip to content

Instantly share code, notes, and snippets.

View chandan-cordova's full-sized avatar

Chandan chandan-cordova

View GitHub Profile
@victorbordo
victorbordo / github_api_pagination.py
Last active January 17, 2024 07:42
Paginate through a Github API request with Python requests
import requests
import logging
logger = logging.getLogger()
handler = logging.StreamHandler()
formatter = logging.Formatter(
'%(asctime)s %(name)-12s %(levelname)-8s %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)