Skip to content

A Python tool for analyzing GitHub profiles and repository statistics.

License

Notifications You must be signed in to change notification settings

RMNCLDYO/github-stats-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitHub

GitHub Stats Checker

maintained - yes contributions - welcome

GitHub

A Python tool for analyzing GitHub profiles and repository statistics. This tool allows you to fetch comprehensive statistics about any GitHub user's repositories, including stars, forks, watchers, and more.

πŸš€ Features

  • πŸ“Š Profile Analytics: Fetch comprehensive GitHub user profile information and statistics
  • πŸ“ˆ Repository Stats: Analyze stars, forks, watchers, and other metrics for repositories
  • πŸ”’ Private Repos: Support for private repository access with proper authentication
  • πŸͺΆ Lightweight Design: Minimal dependencies for easy setup and deployment
  • πŸ”’ Robust Error Handling: Comprehensive error catching and validation

πŸ“‹ Table of Contents

πŸ›  Installation

  1. Clone the repository:

    git clone https://github.com/RMNCLDYO/github-stats-checker.git
  2. Navigate to the repository folder:

    cd github-stats-checker
  3. Install the required dependencies:

    pip install -r requirements.txt

πŸ”’ Authentication (Optional)

In order to access private repositories, you must provide a personal access token with the read:user scope selected.

Important

Without a personal access token, this tool will not be able to access private repositories.

πŸ”‘ Configuration (Optional)

  1. Obtain an access token from GitHub.

  2. You have three options for managing your access token:

    Click here to view the access token configuration options
    • Setting it as an environment variable on your device (recommended for everyday use)

      • Navigate to your terminal.
      • Add your access token like so:
        export GITHUB_ACCESS_TOKEN=YOUR_GITHUB_ACCESS_TOKEN_HERE

      This method allows the access token to be loaded automatically when using the wrapper.

    • Using an .env file (recommended for development):

      • Install python-dotenv if you haven't already: pip install python-dotenv.
      • Create a .env file in the project's root directory or rename example.env to .env.
      • Add your access token to the .env file like so:
        GITHUB_ACCESS_TOKEN=YOUR_GITHUB_ACCESS_TOKEN_HERE

      This method allows the access token to be loaded automatically when using the wrapper.

πŸ’» Usage

import github

github.crawl()

βš™οΈ Advanced Configuration

You can customize the behavior of the tool by modifying the config.yaml file in the root directory of the repository.

Option Type Description Default
repo_limit Integer Maximum repositories to analyze 100
include_private_repos Boolean Include private repositories false
include_forks Boolean Include forked repositories true
include_stars Boolean Include repository stars true
include_watchers Boolean Include repository watchers true
include_overall_totals Boolean Show combined statistics true
include_individual_totals Boolean Show per-repository stats true
timeout Integer API request timeout (seconds) 10

πŸ”’ Error Handling and Safety

Error Type Description Solution
TokenError Invalid/missing token Check token permissions
ConfigError Configuration issues Verify config.yaml
RateLimitError API rate limiting Wait or use authentication
NetworkError Connection issues Check internet connection
ValidationError Invalid parameters Verify input parameters

🀝 Contributing

Contributions are welcome!

Please refer to CONTRIBUTING.md for detailed guidelines on how to contribute to this project.

πŸ› Issues and Support

Encountered a bug? We'd love to hear about it. Please follow these steps to report any issues:

  1. Check if the issue has already been reported.
  2. Use the Bug Report template to create a detailed report.
  3. Submit the report here.

Your report will help us make the project better for everyone.

πŸ’‘ Feature Requests

Got an idea for a new feature? Feel free to suggest it. Here's how:

  1. Check if the feature has already been suggested or implemented.
  2. Use the Feature Request template to create a detailed request.
  3. Submit the request here.

Your suggestions for improvements are always welcome.

πŸ” Versioning and Changelog

Stay up-to-date with the latest changes and improvements in each version:

  • CHANGELOG.md provides detailed descriptions of each release.

πŸ” Security

Your security is important to us. If you discover a security vulnerability, please follow our responsible disclosure guidelines found in SECURITY.md. Please refrain from disclosing any vulnerabilities publicly until said vulnerability has been reported and addressed.

πŸ“„ License

Licensed under the MIT License. See LICENSE for details.