If you want to manage your Github resources (repositories, user profiles, organizations, etc.) from Python scripts, try PyGithub. Above is an example to get a list of Github repositories when searching for a certain topic.
You just need Github object your Github account to get almost any information on Github.
I used PyGithub along with other Python libraries to scrape more than 1k top machine learning Github profiles.
Find more on how to use PyGithub here.