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.
pip install github-contributions
Given a string or sequence of usernames returns the Github contribution counts as JSON.
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
}
}
]
}