Skip to content

Instantly share code, notes, and snippets.

@dipakyadav
Last active May 5, 2018 01:26
Show Gist options
  • Save dipakyadav/758e97e40d358d92ecf7567b4e9b0793 to your computer and use it in GitHub Desktop.
Save dipakyadav/758e97e40d358d92ecf7567b4e9b0793 to your computer and use it in GitHub Desktop.
Retrieve list of stargazers information for specific repo
# -*- coding: utf-8 -*-
# python3
"""
author : Dipak Yadav
"""
from github import Github
g = Github("{GitHub Personal Token}", per_page=100)
print("'name', 'url', 'bio', 'location', 'email', 'blog', 'avatar_url'")
for stargazer in g.get_repo("{organization/reponame}").get_stargazers():
print('"' + '","'.join(list(map(lambda s: s or "", [stargazer.name, stargazer.url, stargazer.bio, stargazer.location, stargazer.email, stargazer.blog, stargazer.avatar_url]))) + '"')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment