Skip to content

Latest commit

 

History

History
166 lines (128 loc) · 8.45 KB

README.md

File metadata and controls

166 lines (128 loc) · 8.45 KB

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.