Skip to content

Instantly share code, notes, and snippets.

@monperrus
Created March 16, 2025 10:30
Show Gist options
  • Save monperrus/b70446d4fc041a3a2182d86eebb0299c to your computer and use it in GitHub Desktop.
Save monperrus/b70446d4fc041a3a2182d86eebb0299c to your computer and use it in GitHub Desktop.
iterate over all repos of a github organization in python
from github import Github
# First create a Github instance using an access token
g = Github("98b9ad24ffc7df18d14c9943eef3700e1b3958c5")
# Then get the organization by its name
org = g.get_organization("chains-project")
# Then iterate over all repos in the organization
for repo in org.get_repos():
#print(dir(repo))
if repo.description != None:
print(repo.name+": "+repo.description)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment