Use the full Github API v3
Project description
(Very short) Tutorial
First create a Github instance:
from github import Github # Authentication is defined via github.Auth from github import Auth # using an access token auth = Auth.Token("access_token") # Public Web Github g = Github(auth=auth) # Github Enterprise with custom hostname g = Github(auth=auth, base_url="https://{hostname}/api/v3")
Then play with your Github objects:
for repo in g.get_user().get_repos(): print(repo.name) repo.edit(has_wiki=False) # to see all the available attributes and methods print(dir(repo))
To close connections after use:
g.close()
Reference documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PyGithub-2.1.1.tar.gz
(3.3 MB
view details)
Built Distribution
PyGithub-2.1.1-py3-none-any.whl
(302.9 kB
view details)
File details
Details for the file PyGithub-2.1.1.tar.gz
.
File metadata
- Download URL: PyGithub-2.1.1.tar.gz
- Upload date:
- Size: 3.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecf12c2809c44147bce63b047b3d2e9dac8a41b63e90fcb263c703f64936b97c |
|
MD5 | 6b40f4a9ec157091ed208d47d62a0caf |
|
BLAKE2b-256 | e2bcb9a3c3d6870d1e216fa8c79cf6d183a2da3df1bdcb7823c79cd2a6faa6b6 |
File details
Details for the file PyGithub-2.1.1-py3-none-any.whl
.
File metadata
- Download URL: PyGithub-2.1.1-py3-none-any.whl
- Upload date:
- Size: 302.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b528d5d6f35e991ea5fd3f942f58748f24938805cb7fcf24486546637917337 |
|
MD5 | 2670019797b7320a9feea21d1f4a7ad4 |
|
BLAKE2b-256 | be04810d131be173cba445d3658a45512b2b2b3d0960d52c4a300d6ec5e00f52 |