Skip to content

Instantly share code, notes, and snippets.

@CodeMaster7000
Created February 15, 2023 12:30
Show Gist options
  • Save CodeMaster7000/e62c16f0f4806730219f38401890e835 to your computer and use it in GitHub Desktop.
Save CodeMaster7000/e62c16f0f4806730219f38401890e835 to your computer and use it in GitHub Desktop.
A Python program to print the number of stars a Github repo has.
from github import Github
g_cred = Github("<Paste Your Token Here>")
f_repo = input("Enter repository name to see its stars (eg. user/repo): ")
repo = g_cred.get_repo(f_repo)
print(repo.stargazers_count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment