Simple yet effective tool for retrieving GitHub repository information
Retrieves public repository information for any GitHub user. Provides an easy-to-use interface to access repository data including metadata, statistics, and other relevant information from GitHub's REST API.
githubinformer — a simple yet effective tool that retrieves public repository information for any GitHub user. It provides an easy-to-use interface to access repository data including metadata, statistics, and other relevant information from GitHub's REST API.
Prerequisites: Python 3.x, Internet connection
git clone https://github.com/aixandrolab/githubinformer.git cd githubinformer
Structure:
githubinformer/ ├── githubinformer/ │ ├── __init__.py │ └── github_informer.py └── app.py
Basic Usage:
from githubinformer.github_informer import GitHubInformer
# Create an informer instance for a GitHub user
informer = GitHubInformer("aixandrolab")
# Get all repositories data
repos_data = informer.get_github_repos_data()
# Get repository count
count = informer.get_repositories_count()
print(f"Total repositories: {count}")
# Get specific repository data
repo = informer.get_repo_data("Hello-World")
print(repo)
Command Line Interface:
python app.py GitHub Name: aixandrolab
Class: GitHubInformer
Constructor: __init__(user) — Creates a new informer instance for the specified GitHub username
Methods:
get_github_data(url) — Class method that fetches and parses JSON data from a given URLget_repo_data(name) — Returns data for a specific repository by nameget_github_repos_data() — Returns all repositories data as a dictionaryget_repositories_count() — Returns the total number of repositoriesProperties:
github_repos_api_url — Returns the GitHub API URL used for fetching repository dataThe method get_repo_data(name) returns a dictionary containing all repository information from GitHub's API, including:
get_github_data method includes exception handling that will print any errors that occur during API requestsBy using this software, you agree to the full disclaimer terms.
Software provided "AS IS" without warranty. You assume all risks.
Full legal disclaimer: See DISCLAIMER.md
License: BSD 3-Clause License