Skip to content
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.

Latest commit

 

History

History
56 lines (42 loc) · 1.08 KB

README.md

File metadata and controls

56 lines (42 loc) · 1.08 KB

github-contributions

Github Contributions

This is a Python module that returns a Github user's public contribution counts. I built this because we wanted to show off contribution counts on our website but the GitHub API does not expose the aggregate contribution statistics on the user resource.

install

pip install github-contributions

api

get_contributions(usernames)

Given a string or sequence of usernames returns the Github contribution counts as JSON.

example

From python:

from git_contributions import get_contributions
get_contributions('garnertb')

# Returns:
{
    "total": 1094,
    "users": [
        {
            "garnertb": {
                "total": 1094
            }
        }
    ]
}

From CLI: Use the contributions command to get contribution counts from the command line:

(git_contributions)$ contributions garnertb
{
    "total": 1094,
    "users": [
        {
            "garnertb": {
                "total": 1094
            }
        }
    ]
}