{"id":27799,"library":"gh-core","title":"gh-core","description":"GitHub Collaboration Relation Extraction is a library for extracting collaboration relationships from GitHub data (e.g., issues, commits, pull requests). It provides tools to analyze and visualize contributor networks. Current version is 2.3.1, requires Python <3.12,>=3.9. Release cadence is irregular.","status":"active","version":"2.3.1","language":"python","source_language":"en","source_url":"https://github.com/birdflyi/GitHub_Collaboration_Relation_Extraction","tags":["github","collaboration","graph","extraction","network-analysis"],"install":[{"cmd":"pip install gh-core","lang":"bash","label":"Latest stable"}],"dependencies":[{"reason":"Graph operations","package":"networkx","optional":false},{"reason":"Data manipulation","package":"pandas","optional":false}],"imports":[{"note":"Avoid attribute import; module not structured that way.","wrong":"import gh_core.GitHubCollaboration","symbol":"GitHubCollaboration","correct":"from gh_core import GitHubCollaboration"},{"note":"Use direct import.","wrong":"","symbol":"extract_relations","correct":"from gh_core import extract_relations"}],"quickstart":{"code":"from gh_core import GitHubCollaboration\nimport os\n\ntoken = os.environ.get('GITHUB_TOKEN', '')\nif not token:\n    print('Set GITHUB_TOKEN environment variable')\nelse:\n    gc = GitHubCollaboration(token)\n    repo='octocat/Hello-World'\n    relations = gc.extract_relations(repo)\n    print(relations)","lang":"python","description":"Initialize with a GitHub token and extract relations from a repository."},"warnings":[{"fix":"Use 'from gh_core import ...'","message":"In version 2.0, the import path changed from ghcore to gh_core. Old code 'from ghcore import ...' will fail.","severity":"breaking","affected_versions":">=2.0"},{"fix":"Replace get_relations with extract_relations.","message":"The method 'get_relations' is deprecated in 2.3.0; use 'extract_relations' instead.","severity":"deprecated","affected_versions":">=2.3.0"},{"fix":"Set GITHUB_TOKEN environment variable or pass token parameter.","message":"A GitHub token is required with repo scope. Without it, API calls will fail with 401.","severity":"gotcha","affected_versions":"all"},{"fix":"Authenticate with a token.","message":"Rate limiting: default GitHub API limit is 60 requests/hour for unauthenticated requests. Use a token to increase (5000/hour).","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure token has access to the target repository.","message":"Library only supports public repositories for data extraction. Private repos require appropriate token and may have limited access.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run 'pip install gh-core' and import using 'from gh_core import ...'.","cause":"Old import path or not installed.","error":"ModuleNotFoundError: No module named 'gh_core'"},{"fix":"Use 'from gh_core import GitHubCollaboration' and ensure version >=1.0.0.","cause":"Incorrect import syntax or outdated version.","error":"AttributeError: module 'gh_core' has no attribute 'GitHubCollaboration'"},{"fix":"Set GITHUB_TOKEN environment variable with a valid token with repo scope.","cause":"Invalid or missing GitHub token.","error":"requests.exceptions.HTTPError: 401 Client Error: Unauthorized"},{"fix":"Upgrade to latest version and use 'extract_relations' instead of 'get_relations'. Reinstall with 'pip install --upgrade gh-core'.","cause":"Using deprecated method name.","error":"KeyError: 'extract_relations'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}