PyGithub MCP Server

- » - Examples - [View page source](https://pygithub.readthedocs.io/en/stable/_sources/examples.rst.txt) * * * # Examples [¶](https://pygithub.readthedocs.io/en/stable/examples.html\#examples "Permalink to this headline") - [Authentication](https://pygithub.readthedocs.io/en/stable/examples/Authentication.html) - [Login authentication](https://pygithub.readthedocs.io/en/stable/examples/Authentication.html#login-authentication) - [OAuth token authentication](https://pygithub.readthedocs.io/en/stable/examples/Authentication.html#oauth-token-authentication) - [Netrc authentication](https://pygithub.readthedocs.io/en/stable/examples/Authentication.html#netrc-authentication) - [App authentication](https://pygithub.readthedocs.io/en/stable/examples/Authentication.html#app-authentication) - [App installation authentication](https://pygithub.readthedocs.io/en/stable/examples/Authentication.html#app-installation-authentication) - [App user authentication](https://pygithub.readthedocs.io/en/stable/examples/Authentication.html#app-user-authentication) - [Main Class](https://pygithub.readthedocs.io/en/stable/examples/MainClass.html) - [Get current user](https://pygithub.readthedocs.io/en/stable/examples/MainClass.html#get-current-user) - [Get user by name](https://pygithub.readthedocs.io/en/stable/examples/MainClass.html#get-user-by-name) - [Get repository by name](https://pygithub.readthedocs.io/en/stable/examples/MainClass.html#get-repository-by-name) - [Get organization by name](https://pygithub.readthedocs.io/en/stable/examples/MainClass.html#get-organization-by-name) - [Get enterprise consumed licenses by name](https://pygithub.readthedocs.io/en/stable/examples/MainClass.html#get-enterprise-consumed-licenses-by-name) - [Search repositories by language](https://pygithub.readthedocs.io/en/stable/examples/MainClass.html#search-repositories-by-language) - [Search repositories based on number of issues with good-first-issue](https://pygithub.readthedocs.io/en/stable/examples/MainClass.html#search-repositories-based-on-number-of-issues-with-good-first-issue) - [Repository](https://pygithub.readthedocs.io/en/stable/examples/Repository.html) - [Get repository topics](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#get-repository-topics) - [Get count of stars](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#get-count-of-stars) - [Get list of open issues](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#get-list-of-open-issues) - [Get list of code scanning alerts](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#get-list-of-code-scanning-alerts) - [Get all the labels of the repository](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#get-all-the-labels-of-the-repository) - [Get all of the contents of the root directory of the repository](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#get-all-of-the-contents-of-the-root-directory-of-the-repository) - [Get all of the contents of the repository recursively](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#get-all-of-the-contents-of-the-repository-recursively) - [Get a specific content file](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#get-a-specific-content-file) - [Create a new file in the repository](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#create-a-new-file-in-the-repository) - [Update a file in the repository](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#update-a-file-in-the-repository) - [Delete a file in the repository](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#delete-a-file-in-the-repository) - [Get the top 10 referrers over the last 14 days](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#get-the-top-10-referrers-over-the-last-14-days) - [Get the top 10 popular contents over the last 14 days](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#get-the-top-10-popular-contents-over-the-last-14-days) - [Get number of clones and breakdown for the last 14 days](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#get-number-of-clones-and-breakdown-for-the-last-14-days) - [Get number of views and breakdown for the last 14 days](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#get-number-of-views-and-breakdown-for-the-last-14-days) - [Mark the notifications of the repository as read](https://pygithub.readthedocs.io/en/stable/examples/Repository.html#mark-the-notifications-of-the-repository-as-read) - [Branch](https://pygithub.readthedocs.io/en/stable/examples/Branch.html) - [Get list of branches](https://pygithub.readthedocs.io/en/stable/examples/Branch.html#get-list-of-branches) - [Get a branch](https://pygithub.readthedocs.io/en/stable/examples/Branch.html#get-a-branch) - [Get HEAD commit of a branch](https://pygithub.readthedocs.io/en/stable/examples/Branch.html#get-head-commit-of-a-branch) - [Get protection status of a branch](https://pygithub.readthedocs.io/en/stable/examples/Branch.html#get-protection-status-of-a-branch) - [See required status checks of a branch](https://pygithub.readthedocs.io/en/stable/examples/Branch.html#see-required-status-checks-of-a-branch) - [Commit](https://pygithub.readthedocs.io/en/stable/examples/Commit.html) - [Create commit status check](https://pygithub.readthedocs.io/en/stable/examples/Commit.html#create-commit-status-check) - [Get commit date](https://pygithub.readthedocs.io/en/stable/examples/Commit.html#get-commit-date) - [PullRequest](https://pygithub.readthedocs.io/en/stable/examples/PullRequest.html) - [Create a new Pull Request](https://pygithub.readthedocs.io/en/stable/examples/PullRequest.html#create-a-new-pull-request) - [Get Pull Request by Number](https://pygithub.readthedocs.io/en/stable/examples/PullRequest.html#get-pull-request-by-number) - [Get Pull Requests by Query](https://pygithub.readthedocs.io/en/stable/examples/PullRequest.html#get-pull-requests-by-query) - [Add and modify Pull Request comment](https://pygithub.readthedocs.io/en/stable/examples/PullRequest.html#add-and-modify-pull-request-comment) - [Issues](https://pygithub.readthedocs.io/en/stable/examples/Issue.html) - [Get issue](https://pygithub.readthedocs.io/en/stable/examples/Issue.html#get-issue) - [Create comment on issue](https://pygithub.readthedocs.io/en/stable/examples/Issue.html#create-comment-on-issue) - [Create issue](https://pygithub.readthedocs.io/en/stable/examples/Issue.html#create-issue) - [Create issue with body](https://pygithub.readthedocs.io/en/stable/examples/Issue.html#create-issue-with-body) - [Create issue with labels](https://pygithub.readthedocs.io/en/stable/examples/Issue.html#create-issue-with-labels) - [Create issue with assignee](https://pygithub.readthedocs.io/en/stable/examples/Issue.html#create-issue-with-assignee) - [Create issue with milestone](https://pygithub.readthedocs.io/en/stable/examples/Issue.html#create-issue-with-milestone) - [Close all issues](https://pygithub.readthedocs.io/en/stable/examples/Issue.html#close-all-issues) - [Milestone](https://pygithub.readthedocs.io/en/stable/examples/Milestone.html) - [Get Milestone list](https://pygithub.readthedocs.io/en/stable/examples/Milestone.html#get-milestone-list) - [Get Milestone](https://pygithub.readthedocs.io/en/stable/examples/Milestone.html#get-milestone) - [Create Milestone](https://pygithub.readthedocs.io/en/stable/examples/Milestone.html#create-milestone) - [Create Milestone with State and Description](https://pygithub.readthedocs.io/en/stable/examples/Milestone.html#create-milestone-with-state-and-description) - [Webhook](https://pygithub.readthedocs.io/en/stable/examples/Webhook.html) - [Creating and Listening to Webhooks with PyGithub and Pyramid](https://pygithub.readthedocs.io/en/stable/examples/Webhook.html#creating-and-listening-to-webhooks-with-pygithub-and-pyramid)