Skip to main content

A package to extract GitHub repository insights

Project description

Introduction

A Python package to extract GitHub repository insights including commit history, pull request analysis, contributor trends, and overall repository health. Designed to simplify engineering reporting and performance tracking.


Requirements



Installation

pip install dataextractor


Usage and Documentation

This example shows how to use the geocentroid package.

from github_data_extractor import dataExtraction
from dotenv import load_dotenv
import os

load_dotenv()
GITHUB_TOKEN = os.getenv('GITHUB_TOKEN')

def main():
    repo_name = ['translate_lib']
    repo_owners = ['aadityayadav']
    repo_tokens = [GITHUB_TOKEN]

    extraction = dataExtraction(repo_name, repo_owners, repo_tokens)

    # method 1    
    extraction.extract_general_overview()
    # method 2
    extraction.extract_aggregate_metrics()
    # method 3
    extraction.extract_data_commit_contributor()
    # method 4
    extraction.extract_data_pr()

if __name__ == "__main__":
    main()

All functions take no parameters directly.
You must provide repo_name, repo_owners, and repo_tokens as lists, so you can extract data from multiple repositories at once.


1) extract_general_overview()

Fetches a high-level snapshot of the repository:

  • Branch information (total branches, last updated)
  • Linked vs unlinked issues
  • File data associated with each pull request

2) extract_aggregate_metrics()

Provides an overview of project health using aggregated statistics:

  • Commit activity over time
  • File modification frequency
  • Pull request volume and lifecycle
  • Pull request quality: reviews, size, and merge times

3) extract_data_commit_contributor()

Gathers contributor and commit behavior:

  • Commit counts by contributor
  • Time-based commit activity
  • New vs returning contributor patterns

4) extract_data_pr()

Detailed pull request analytics:

  • PR open/merge/close timestamps
  • Review histories and discussions
  • Issue linkages, milestone tagging, and contributor-level PR trends


Returns:

  • Automatically saves a CSV under a folder ExtractedData containing repo metrics.

Project details


Download files

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

Source Distribution

github_data_extractor-0.0.10.tar.gz (11.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_data_extractor-0.0.10-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file github_data_extractor-0.0.10.tar.gz.

File metadata

  • Download URL: github_data_extractor-0.0.10.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for github_data_extractor-0.0.10.tar.gz
Algorithm Hash digest
SHA256 1fc08c86758bee2b1dc0a16bbc77f08a3ca12694652127b2ca737055169e9be8
MD5 adfe655cad2b28a5afb6061c35345034
BLAKE2b-256 38df648ef8ef3e043177670d3b715c488a7218b3f26ae6b3bd8cd1e7ea17bfad

See more details on using hashes here.

File details

Details for the file github_data_extractor-0.0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for github_data_extractor-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 16550ba672481b40d6640cb13b23828fb44ae3c130c42636b5459e1ac45e4ec2
MD5 660bbed2a1017ac0a1b2964716527d91
BLAKE2b-256 baae55432107d495619367498bedb119a2dac39410730c12f2e218c4fb2be117

See more details on using hashes here.

Supported by

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