github_contributions.GithubUser

class github_contributions.user.GithubUser(username, url=None)

Represents a user on github, and can poll information about that user’s contribution history.

Parameters:
  • username (str) – The user’s Github username
  • url (str) – The base Github URL – useful for use on Github Enterprise. (Optional)
contributions(start_date=None, end_date=None)

Fetches the contribution history for the given user

By default, fetches 1 year of contribution history

Parameters:
  • start_date (date) – Optional start date
  • end_date (date) – Optional end date. Defaults to today.
Returns:

Returns contributions object

Return type:

GithubContributions

current_streak()

Returns the active streak of the user

Will return the full list of days associated with the user’s streak even if this streak lasts longer than 1 year.

Returns:Returns list of days representing current streak
Return type:list[Day]
longest_streak()

Fetches the longest contribution streak of the user

Only checks for streaks that have started within the past year.

Returns:Returns list of days representing longest known streak
Return type:list[Day]