GitHub

class github.GitHub(token_or_username, password=None)

Create a GitHub service.

Variables:
  • token_or_username (str) – Either an OAuth 2.0 token, or the username if you want to use Basic authentication.
  • password (str) – Only used with the Basic authentication, leave this as None when using OAuth.

Authorization

GitHub.authorization(authorization_id)

Return the resource corresponding to a single authorization. Authorizations can only be accessed when using Basic authentication.

Authorization.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Authorization.delete()

Delete this resource.

Authorization.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
Authorization.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

Authorizations

GitHub.authorizations()

Return the resource corresponding to all the authorizations. Authorizations can only be accessed when using Basic authentication.

Authorizations.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Authorizations.delete()

Delete this resource.

Authorizations.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
Authorizations.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

Gist

GitHub.gist(gist_id)

Return the resource corresponding to a single gist.

Gist.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Gist.delete()

Delete this resource.

Gist.fork()

Fork this gist.

Gist.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
Gist.is_starred()

Check if this gist is starred.

Returns:bool
Gist.star()

Star this gist.

Gist.unstar()

Unstar this gist.

Gist.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

Gists

GitHub.gists()

Return the resource corresponding to all the gists.

GistComment

Gists.comment(comment_id)

Return the resource corresponding to a single comment on a gist.

When updating comments, use a simple string as the parameter to update, you don’t have to use {“body”: <comment body>}.

GistComment.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
GistComment.delete()

Delete this resource.

GistComment.get(format=None, page=None, per_page=None)
GistComment.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
Gists.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Gists.delete()

Delete this resource.

Gists.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
Gists.public(page=None, per_page=None)

Fetch public gists. The parameters are the same as for get.

Gists.starred(page=None, per_page=None)

Fetch gists starred by the authenticated user. The parameters are the same as for get.

Gists.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

Issues

GitHub.issues()

Return the resource corresponding to all the issues of the authenticated user.

Issues.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Issues.delete()

Delete this resource.

Issues.get(filter='assigned', state='open', labels=None, sort='created', direction='desc', since=None, format=None, page=None, per_page=None)

Fetch the authenticated user’s issues based on the filter parameters, and using the specified format.

For details on the meanings and allowed values for each parameter, see http://developer.github.com/v3/issues/#list-issues.

Issues.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

Repo

GitHub.repo(user, repo)

Return the resource corresponding to a single repo.

RepoCollaborators

Repo.collaborators()

Return a resource corresponding to all collaborators in this repo.

RepoCollaborators.add(user)

Add a collaborator to this repo.

Variables:user (str) – The username of the new collaborator.
RepoCollaborators.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
RepoCollaborators.is_collaborator(user)

Check if a user is a collaborator in this repo.

Variables:user (str) – The username to check.
Returns:bool
RepoCollaborators.remove(user)

Remove a collaborator from this repo.

Variables:user (str) – The username of the collaborator.

RepoCommit

Repo.commit(sha)

Return a resource corresponding to a single commit in this repo.

RepoCommitsComments

RepoCommit.comments()

Return a resource corresponding to all comments of this commit.

RepoCommitsComments.create(comment)

Create a comment on this commit.

Variables:comment (str) – The comment body.
RepoCommitsComments.delete()

Delete this resource.

RepoCommitsComments.get(format=None, page=None, per_page=None)

Fetch all comments for this commit.

Variables:format – Which format should be requested, either raw, text, html or full. For details on formats, see http://developer.github.com/v3/mime/#comment-body-properties.
RepoCommitsComments.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
RepoCommit.get()

Fetch all commits from this repo.

RepoCommits

Repo.commits()

Return a resource corresponding to all commits in this repo.

RepoCommitsComment

RepoCommits.comment(comment_id)

Return the resource corresponding to a single comment of this commit.

RepoCommitsComment.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
RepoCommitsComment.delete()

Delete this resource.

RepoCommitsComment.get(format=None)

Fetch the comment.

Variables:format – Which format should be requested, either raw, text, html or full. For details on formats, see http://developer.github.com/v3/mime/#comment-body-properties.
RepoCommitsComment.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

RepoCommitsComments

RepoCommits.comments()

Return the resource corresponding to all comments of this commit.

RepoCommitsComments.create(comment)

Create a comment on this commit.

Variables:comment (str) – The comment body.
RepoCommitsComments.delete()

Delete this resource.

RepoCommitsComments.get(format=None, page=None, per_page=None)

Fetch all comments for this commit.

Variables:format – Which format should be requested, either raw, text, html or full. For details on formats, see http://developer.github.com/v3/mime/#comment-body-properties.
RepoCommitsComments.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
RepoCommits.compare(base, head)

Fetch the comparison of two commits.

Variables:
  • base (str) – The commit hash of the first commit.
  • head (str) – The commit hash of the second commit.
RepoCommits.get(sha=None, path=None, page=None, per_page=None)

Fetch commits for this repo.

Variables:
  • sha (str) – Optional commit hash or branch to start listing commits from.
  • path (str) – Optional filter to only include commits that include this file path.

RepoContents

Repo.contents()

Return a resource corresponding to repo contents.

This method will return a URL to download a tarball or zipball archive for a repository.

Variables:
  • archive_format – Either tarball or zipball.
  • ref – Optional string name of the commit/branch/tag. Defaults to master.
RepoContents.get(path=None, ref=None)

This method returns the contents of any file or directory in a repository.

Variables:
  • path (str) – Optional content path.
  • ref (str) – Optional string name of the commit/branch/tag. Defaults to master.
RepoContents.readme(ref=None)

This method returns the preferred README for a repository.

Variables:ref (str) – Optional string name of the commit/branch/tag. Defaults to master.

Download

Repo.download(download_id)

Return a resource corresponding to a single download in this repo.

Download.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Download.delete()

Delete this resource.

Download.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.

Downloads

Repo.downloads()

Return a resource corresponding to all commits from this repo.

Downloads.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Downloads.delete()

Delete this resource.

Downloads.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.

Forks

Repo.forks()

Return a resource corresponding to all forks of this repo.

Forks.create()

Fork this repo.

Forks.get(sort='newest', page=None, per_page=None)

Fetch this repo’s forks.

Variables:
  • sort (str) – The sort order for the result.
  • page (int) – The starting page of the result. If left as None, the first page is returned.
  • per_page (int) – The amount of results per page.

RepoIssue

Repo.issue(issue_id)

Return a resource corresponding to a single issue from this repo.

IssueComments

RepoIssue.comments()

Return the resource corresponding to the comments of this issue.

When creating comments, use a simple string as the parameter to create, you don’t have to use {“body”: <comment body>}.

IssueComments.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
IssueComments.delete()

Delete this resource.

IssueComments.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
IssueComments.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

IssueEvent

RepoIssue.event(event_id)

Return the resource corresponding to a single event of this issue.

IssueEvent.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.

IssueEvents

RepoIssue.events()

Return the resource corresponding to all the events of this issue.

IssueEvents.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.

IssueLabel

RepoIssue.label(name)

Return the resource corresponding to a single label of this issue.

IssueLabel.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
IssueLabel.delete()

Delete this resource.

IssueLabel.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
IssueLabel.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

IssueLabels

RepoIssue.labels()

Return the resource corresponding to all labels of this issue.

IssueLabels.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
IssueLabels.delete()

Delete all labels from this issue.

IssueLabels.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
IssueLabels.replace(labels)

Replace all labels on this issue with new ones.

Variables:labels (list of str) – A list of labels to use.
IssueLabels.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
RepoIssue.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
RepoIssue.delete()

Delete this resource.

RepoIssue.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
RepoIssue.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

RepoIssues

Repo.issues()

Return a resource corresponding to all issues from this repo.

IssueComment

RepoIssues.comment(comment_id)

Return the resource corresponding to a single comment of an issue.

When updating comments, use a simple string as the parameter to update, you don’t have to use {“body”: <comment body>}.

IssueComment.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
IssueComment.delete()

Delete this resource.

IssueComment.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
IssueComment.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

IssueEvents

RepoIssues.events()

Return the resource corresponding to all events of this repo’s issues.

IssueEvents.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
RepoIssues.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
RepoIssues.delete()

Delete this resource.

RepoIssues.get(milestone=None, state='open', assignee=None, mentioned=None, labels=None, sort='created', direction='desc', since=None, page=None, per_page=None)

Fetch issues for this repository based on the filter parameters and using the specified format.

For details on the meanings and allowed values for each parameter, see http://developer.github.com/v3/issues/#list-issues-for-a-repository

RepoIssues.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

RepoKey

Repo.key(key_id)

Return a resource corresponding to a single key in this repo.

RepoKey.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
RepoKey.delete()

Delete this resource.

RepoKey.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
RepoKey.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

RepoKeys

Repo.keys()

Return a resource corresponding to all SSH keys of this repo.

RepoKeys.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
RepoKeys.delete()

Delete this resource.

RepoKeys.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
RepoKeys.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

RepoLabel

Repo.label(name)

Return a resource corresponding to a single label from this repo.

RepoLabel.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
RepoLabel.delete()

Delete this resource.

RepoLabel.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
RepoLabel.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

RepoLabels

Repo.labels()

Return a resource corresponding to all issues from this repo.

RepoLabels.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
RepoLabels.delete()

Delete this resource.

RepoLabels.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
RepoLabels.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

Milestone

Repo.milestone(milestone_id)

Return a resource corresponding to a single milestone in this repo.

MilestoneLabels

Milestone.labels()

Return the resource corresponding to the labels of this milestone.

MilestoneLabels.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
MilestoneLabels.delete()

Delete this resource.

MilestoneLabels.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
MilestoneLabels.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
Milestone.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Milestone.delete()

Delete this resource.

Milestone.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
Milestone.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

Milestones

Repo.milestones()

Return a resource corresponding to all milestones in this repo.

Milestones.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Milestones.delete()

Delete this resource.

Milestones.get(state='open', sort='due_date', direction='desc', page=None, per_page=None)

Fetch milestones for this repository, based on the filter parameters.

For details on the meanings and allowed values for each parameter, see http://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository.

Milestones.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

PullRequest

Repo.pullrequest(number)

Return a resource corresponding to a single pull request for this repo.

PullRequest.commits()

Fetch commits on this pull request.

PullRequest.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
PullRequest.delete()

Delete this resource.

PullRequest.files()

Fetch files on this pull request.

PullRequest.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
PullRequest.is_merged()

Check if this pull request has been merged.

PullRequest.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

PullRequests

Repo.pullrequests()

Return a resource corresponding to all the pull requests for this repo.

PullRequests.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
PullRequests.delete()

Delete this resource.

PullRequests.get(state=None, page=None, per_page=None)

Fetch pull requests.

Variables:state – Optional filter pull requests by state state: open or closed (default is open)
PullRequests.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
Repo.branches()

Fetch the branches for this repo.

Repo.contributors(anon=False)

Fetch the contributors from this repo.

Variables:anon (bool) – Include anonymous contributors.
Repo.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Repo.delete()

Delete this resource.

Repo.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
Repo.languages()

Fetch the languages for this repo.

Repo.tags()

Fetch the tags for this repo.

Repo.teams()

Fetch the teams for this repo.

Repo.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

Repos

GitHub.repos()

Return the resource corresponding to all the repos.

Repos.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Repos.delete()

Delete this resource.

Repos.get(type='all', page=None, per_page=None)

Fetch repos for this user.

Variables:type – What type of repos to fetch. For details of allowed values, see http://developer.github.com/v3/repos/#list-user-repositories.
Repos.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

User, CurrentUser

GitHub.user(name=None)

Return the resource corresponding to a single user. If name is None the returned resource is the currently authenticated user, otherwise it is the user with the given name.

UserRepos

User.repos(page=None, per_page=None)

Return the resource corresponding to all the repos of this user.

UserRepos.delete()

Delete this resource.

UserRepos.get(type='all', page=None, per_page=None)

Fetch repos for this user.

Variables:type (str) – What type of repos to fetch. For details of allowed values, see http://developer.github.com/v3/repos/#list-user-repositories.
UserRepos.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
User.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
User.followers(page=None, per_page=None)

Fetch the followers of this user.

User.following(page=None, per_page=None)

Fetch users that this user is following.

User.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.

UserEmails

CurrentUser.emails()

Return the resource corresponding to the emails of the authenticated user.

UserEmails.add(emails)

Add emails to the authenticated user.

Variables:emails (list of str) – A list of emails to add.
UserEmails.get()

Fetch all emails of the authenticated user.

UserEmails.remove(emails)

Remove emails from the authenticated user.

Variables:emails (list of str) – A list of emails to remove.
CurrentUser.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
CurrentUser.follow(name)

Start following the given user.

CurrentUser.followers(page=None, per_page=None)

Fetch the followers of this user.

CurrentUser.following(page=None, per_page=None)

Fetch users that this user is following.

CurrentUser.follows(name)

Check if the authenticated user follows the given user.

Returns:bool
CurrentUser.get(page=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • page (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 100. If left as None, 30 objects are returned.
CurrentUser.unfollow(name)

Stop following the given user.

CurrentUser.update(obj)