Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rmncldyo/github-stats-checker

A Python tool for analyzing GitHub profiles and repository statistics.
https://github.com/rmncldyo/github-stats-checker

forks git github github-forks github-profile github-stars github-stat github-statistics github-stats github-watchers private-repo private-repository profile-analyzer public-repo public-repository repo-stats repository repository-stats stars watchers

Last synced: 7 days ago
JSON representation

A Python tool for analyzing GitHub profiles and repository statistics.

Awesome Lists containing this project

README

        



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](#-installation)
- [Authentication](#-authentication-optional)
- [Configuration](#-configuration-optional)
- [Usage](#-usage)
- [Advanced Configuration](#%EF%B8%8F-advanced-configuration)
- [Error Handling and Safety](#-error-handling-and-safety)
- [Contributing](#-contributing)
- [Issues and Support](#-issues-and-support)
- [Feature Requests](#-feature-requests)
- [Versioning and Changelog](#-versioning-and-changelog)
- [Security](#-security)
- [License](#-license)

## 🛠 Installation

1. Clone the repository:
```bash
git clone https://github.com/RMNCLDYO/github-stats-checker.git
```

2. Navigate to the repository folder:
```bash
cd github-stats-checker
```

3. Install the required dependencies:
```bash
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](https://github.com/settings/tokens).
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:
```shell
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:
```makefile
GITHUB_ACCESS_TOKEN=YOUR_GITHUB_ACCESS_TOKEN_HERE
```
This method allows the access token to be loaded automatically when using the wrapper.

## ðŸ’ŧ Usage

```python
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](.github/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](.github/ISSUE_TEMPLATE/bug_report.md) template to create a detailed report.
3. Submit the report [here](https://github.com/RMNCLDYO/github-stats-checker/issues).

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](.github/ISSUE_TEMPLATE/feature_request.md) template to create a detailed request.
3. Submit the request [here](https://github.com/RMNCLDYO/github-stats-checker/issues).

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](.github/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](.github/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](LICENSE) for details.