Skip to main content

GitHub Organization Statistics Tool

License: MIT Python 3.7+ GitHub Issues GitHub Stars

A comprehensive, open-source tool for analyzing GitHub organization statistics including repository metrics, contributor activity, code quality insights, and multi-organization support with GitHub Apps.

🚀 Features

  • Repository Analysis: Comprehensive metrics including stars, forks, issues, languages, and activity
  • Contributor Insights: Detailed contributor analysis with bot filtering capabilities
  • Code Quality Metrics: Language statistics, dependency analysis, and security insights
  • Multi-Organization Support: GitHub App authentication for analyzing multiple organizations
  • Flexible Output: JSON, CSV, and Excel formats with rich formatting
  • Advanced Filtering: Include/exclude forks, archived repos, empty repos, and bot accounts
  • Rate Limit Management: Intelligent rate limiting and retry mechanisms
  • Error Handling: Robust error handling with detailed logging and recovery

📦 Installation

Prerequisites

  • Python 3.7 or higher
  • pip package manager

Install Dependencies

pip install -r requirements.txt

Quick Install

git clone https://github.com/zoharbabin/github-org-stats.git
cd github-org-stats
pip install -r requirements.txt

🔧 Quick Start

Basic Usage

Analyze a GitHub organization with a personal access token:

python github_org_stats.py --org your-org --token ghp_your_token_here

GitHub App Authentication

For enterprise use and higher rate limits:

python github_org_stats.py \
  --org your-org \
  --app-id 12345 \
  --private-key /path/to/private-key.pem \
  --installation-id 67890

Advanced Usage

# Generate all output formats with bot filtering
python github_org_stats.py \
  --org your-org \
  --token ghp_token \
  --format all \
  --exclude-bots \
  --days-back 90 \
  --output-dir ./reports

📊 Output Formats

Excel Output (Default)

  • Repository_Data: Complete repository information
  • Summary: High-level organization statistics
  • Contributors: Top contributors analysis
  • Languages: Language distribution
  • Errors: Error tracking information

JSON Output

Structured JSON with complete data hierarchy for programmatic access.

CSV Output

Flattened data suitable for spreadsheet analysis and data processing tools.

🔐 Authentication

Personal Access Token

For individual use or small-scale analysis:

  • Required permissions: repo, read:org, read:user

GitHub App

For enterprise use and multi-organization analysis:

  • Higher rate limits
  • Better security
  • Multi-organization support

See docs/USAGE.md for detailed authentication setup.

📖 Documentation

🧪 Testing

Run the test suite:

cd tests
python test_github_org_stats.py

Run specific test categories:

python test_github_org_stats.py --category auth
python test_github_org_stats.py --category data

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch
  3. Install development dependencies: pip install -r requirements-dev.txt
  4. Make your changes
  5. Run tests: python -m pytest tests/
  6. Submit a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

🌟 Star History

Star History Chart

🙏 Acknowledgments

  • Thanks to all contributors who have helped improve this tool
  • Built with PyGithub for GitHub API access
  • Inspired by the need for comprehensive GitHub organization analysis

Made with ❤️ by the open-source community

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

github_org_stats-0.1.0.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

github_org_stats-0.1.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file github_org_stats-0.1.0.tar.gz.

File metadata

  • Download URL: github_org_stats-0.1.0.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for github_org_stats-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fe59fdd4f89d59570feb89e08528ce0dc8d310e80c99c8c634d09d6d238ca54f
MD5 a76b2391015e7b6a4e4f071c23a6b985
BLAKE2b-256 f8298986d8a138e7c741e6802f74124d4fedf110798aac75c6019df6dd28b908

See more details on using hashes here.

Provenance

The following attestation bundles were made for github_org_stats-0.1.0.tar.gz:

Publisher: test-and-publish.yml on zoharbabin/github-org-stats

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file github_org_stats-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for github_org_stats-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b5d8549f73304f02450124d46778162cbf1bec7a9be084bff100a57f7af9d4b
MD5 1f7f1c11c54394887c83c167c70d993b
BLAKE2b-256 c47e11aec1e30a3382351f34967ef62e2b90da7f8ba20def42400dbe7af125f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for github_org_stats-0.1.0-py3-none-any.whl:

Publisher: test-and-publish.yml on zoharbabin/github-org-stats

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page