项目作者: PyGithub

项目描述 :
Typed interactions with the GitHub API v3
高级语言: Python
项目地址: git://github.com/PyGithub/PyGithub.git
创建时间: 2012-02-25T12:53:47Z
项目社区:https://github.com/PyGithub/PyGithub

开源协议:GNU Lesser General Public License v3.0

下载


PyGitHub

PyPI
CI
readthedocs
License
Slack
Open Source Helpers
codecov
Code style: black

PyGitHub is a Python library to access the GitHub REST API.
This library enables you to manage GitHub resources such as repositories, user profiles, and organizations in your Python applications.

Install

  1. pip install PyGithub

Simple Demo

  1. from github import Github
  2. # Authentication is defined via github.Auth
  3. from github import Auth
  4. # using an access token
  5. auth = Auth.Token("access_token")
  6. # First create a Github instance:
  7. # Public Web Github
  8. g = Github(auth=auth)
  9. # Github Enterprise with custom hostname
  10. g = Github(base_url="https://{hostname}/api/v3", auth=auth)
  11. # Then play with your Github objects:
  12. for repo in g.get_user().get_repos():
  13. print(repo.name)
  14. # To close connections after use
  15. g.close()

Documentation

More information can be found on the PyGitHub documentation site.

Development

Contributing

Long-term discussion and bug reports are maintained via GitHub Issues.
Code review is done via GitHub Pull Requests.

For more information read CONTRIBUTING.md.

Maintainership

We’re actively seeking maintainers that will triage issues and pull requests and cut releases.
If you work on a project that leverages PyGitHub and have a vested interest in keeping the code alive and well, send an email to someone in the MAINTAINERS file.