{"id":15419418,"url":"https://github.com/arjunrn/ghe-stats","last_synced_at":"2026-05-07T15:38:11.588Z","repository":{"id":43116422,"uuid":"157110430","full_name":"arjunrn/ghe-stats","owner":"arjunrn","description":"Data scraper for Github API using PyGithub","archived":false,"fork":false,"pushed_at":"2022-03-17T16:13:45.000Z","size":19,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-11T02:43:07.827Z","etag":null,"topics":["github","postgres","pygithub","python","stats"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arjunrn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-11T18:52:20.000Z","updated_at":"2022-03-17T16:05:45.000Z","dependencies_parsed_at":"2022-08-19T09:02:01.277Z","dependency_job_id":null,"html_url":"https://github.com/arjunrn/ghe-stats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arjunrn/ghe-stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunrn%2Fghe-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunrn%2Fghe-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunrn%2Fghe-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunrn%2Fghe-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arjunrn","download_url":"https://codeload.github.com/arjunrn/ghe-stats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunrn%2Fghe-stats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005967,"owners_count":26084004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","postgres","pygithub","python","stats"],"created_at":"2024-10-01T17:25:01.658Z","updated_at":"2025-10-11T02:43:08.144Z","avatar_url":"https://github.com/arjunrn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Github Stats\n\nThis script is used to collect statistic on contributions to Github or Github Enterprise\nrepositories. The collected statistics are stored in Postgres databases.\n\n### Instructions\n\n1. Install dependencies\n\n```\n    pipenv install \n```\n\n2. Create Schemas\n\n```bash\n\npipenv run python main.py create-schemas\n```\n\n3. Add Organization and Repositories\n\n```bash\n\npipenv run python main.py add-orgs\npipenv run python main.py add-repos\n\n```\n\n4. Fetch the contributions\n\n```bash\n\npipenv run python main.py get-contributions --days 30\n\n```\nThe `--days` options can be used to pass the number of days in the past to consider \nwhile saving the contributions.\n\n__Note:__ The *Access Token* and URL used to acces the API can be passed with the\nenvironment variable `GITHUB_TOKEN` and `GITHUB_URL`. The connection string for\nthe Postgres database can be passed through the environment variable `DB_CONN`.\nFollowing is a sample use:\n\n```bash\n\n    GITHUB_URL=https://github.example.com/api/v3 GITHUB_TOKEN=secrettokenxxxx33 \\\n    DB_CONN=posgres://ghestats:ghestats@localhost:5432/ghestats pipenv run \\\n    python main.py add-repos\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjunrn%2Fghe-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farjunrn%2Fghe-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjunrn%2Fghe-stats/lists"}