PyGithub

Use the full Github API v3

108 个版本 Python >=3.9
安装
pip install PyGithub
poetry add PyGithub
pipenv install PyGithub
conda install PyGithub
描述

PyGitHub

PyPI CI readthedocs License Slack Open Source Helpers codecov

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

pip install PyGithub

Simple Demo

from github import Github

# Authentication is defined via github.Auth
from github import Auth

# using an access token
auth = Auth.Token("access_token")

# First create a Github instance:

# Public Web Github
g = Github(auth=auth)

# Github Enterprise with custom hostname
g = Github(base_url="https://{hostname}/api/v3", auth=auth)

# Then play with your Github objects:
for repo in g.get_user().get_repos():
    print(repo.name)

# To close connections after use
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.

版本列表
2.9.1 2026-04-14
2.9.0 2026-03-22
2.8.1 2025-09-02
2.8.0 2025-09-02
2.7.0 2025-07-31
2.6.1 2025-02-21
2.6.0 2025-02-15
2.5.0 2024-11-06
2.4.0 2024-08-26
2.3.0 2024-03-24
2.2.0 2024-01-30
2.1.1 2023-09-29
2.1.0.post0 2023-09-29
2.0.1rc0 2023-08-03
2.0.0rc1 2023-07-11
2.0.0rc0 2023-07-04
1.59.1 2023-08-03
1.59.0 2023-06-22
1.58.2 2023-05-09
1.58.1 2023-03-18
1.58.0 2023-02-19
1.57 2022-11-05
1.56 2022-10-13
1.55 2021-04-26
1.54.1 2020-12-24
1.54.0.1 2021-04-26
1.54 2021-03-31
1.53 2020-08-18
1.52 2020-08-03
1.51 2020-05-02
1.50 2020-04-26
1.47 2020-03-15
1.46 2020-02-11
1.45 2019-12-29
1.44.1 2019-11-07
1.44 2019-10-19
1.43.8 2019-07-20
1.43.7 2019-04-16
1.43.6 2019-04-05
1.43.5 2019-01-29
1.43.4 2018-12-21
1.43.3 2018-10-31
1.43.2 2018-09-12
1.43.1 2018-09-11
1.43 2018-09-08
1.40 2018-06-26
1.39 2018-04-10
1.38 2018-03-21
1.37 2018-03-01
1.36 2018-02-07
1.35 2017-07-10
1.34 2017-04-02
1.33 2017-03-27
1.32 2017-02-01
1.31 2017-01-30
1.30 2017-01-30
1.29 2016-10-05
1.28 2016-09-11
1.27.1 2016-08-12
1.26.0 2015-11-06
1.25.2 2014-10-08
1.25.1 2014-09-28
1.25.0 2014-05-04
1.24.1 2014-03-16
1.24.0 2014-03-03
1.23.0 2013-12-24
1.22.0 2013-12-16
1.21.0 2013-11-17
1.20.0 2013-10-21
1.19.0 2013-09-08
1.18.0 2013-08-21
1.17.0 2013-07-07
1.16.0 2013-05-31
1.15.0 2013-05-17
1.14.2 2013-04-25
1.14.1 2013-04-25
1.14.0 2013-04-22
1.13.1 2013-03-28
1.13.0 2013-03-22
1.12.2 2013-03-03
1.12.1 2013-02-20
1.11.1 2013-02-09
1.11.0 2013-02-07
1.10.0 2012-12-25
1.9.1 2012-11-20
1.9.0 2012-11-19
1.8.1 2012-10-28
1.8.0 2012-09-30
1.7 2012-09-12
1.6 2012-09-08
1.5 2012-09-05
1.4 2012-08-04
1.3 2012-07-13
1.2 2012-06-29
1.1 2012-06-20
1.0 2012-06-03
1.40a4 2018-05-21
1.40a3 2018-04-26
1.40a2 2018-04-23
1.40a1 2018-04-17
0.7 2012-05-25
0.6 2012-04-17
0.5 2012-03-19
0.4 2012-03-12
0.3 2012-02-26
0.2 2012-02-23
0.1 2012-02-19
0.0.0 2017-04-02