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.
- π 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
- Installation
- Authentication
- Configuration
- Usage
- Advanced Configuration
- Error Handling and Safety
- Contributing
- Issues and Support
- Feature Requests
- Versioning and Changelog
- Security
- License
-
Clone the repository:
git clone https://github.com/RMNCLDYO/github-stats-checker.git
-
Navigate to the repository folder:
cd github-stats-checker
-
Install the required dependencies:
pip install -r requirements.txt
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.
-
Obtain an access token from GitHub.
-
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.
- Install python-dotenv if you haven't already:
-
import github
github.crawl()
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 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 |
Contributions are welcome!
Please refer to CONTRIBUTING.md for detailed guidelines on how to contribute to this project.
Encountered a bug? We'd love to hear about it. Please follow these steps to report any issues:
- Check if the issue has already been reported.
- Use the Bug Report template to create a detailed report.
- Submit the report here.
Your report will help us make the project better for everyone.
Got an idea for a new feature? Feel free to suggest it. Here's how:
- Check if the feature has already been suggested or implemented.
- Use the Feature Request template to create a detailed request.
- Submit the request here.
Your suggestions for improvements are always welcome.
Stay up-to-date with the latest changes and improvements in each version:
- CHANGELOG.md provides detailed descriptions of each release.
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.
Licensed under the MIT License. See LICENSE for details.