
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
pygethub is a Python package for fetching paginated resources such as commits, users, repositories and organizations from the GitHub API. It provides automatic rate-limit handling and pagination for GitHub resources.
To install pygethub
, you can use pip:
pip install pygethub
Here is an example of how you can use pygethub
:
from pygethub import list_commits, GitHubPaginator, list_users
# List commits for a specific repository
commits = list_commits('owner', 'repo', 'your-github-token')
print(commits)
# Use pagination to list users
paginator = GitHubPaginator('your-github-token')
# List users from the beginning, include other request parameters as keyword arguments
users = paginator.get_paginator(list_users)
for user in users:
print(user)
# If you want to resume the listing from a certain user ID, use the `since` parameter
users = paginator.get_paginator(list_users, since=500)
for user in users:
print(user)
# Similarly, you can use the `since` parameter with list_organizations to resume listing from a certain organization ID
To install pygethub
, along with the tools you need to develop and run tests, run the following in your virtual environment:
pip install -e .[dev,test]
Contributions are welcome! Please read our Contributing Guide on how to contribute to pygethub
.
pygethub
is licensed under the terms of the MIT license. See the LICENSE file for the full license text.
FAQs
Fetch data from GitHub
We found that pygethub demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.