Skip to main content

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))

Reference documentation

See http://pygithub.readthedocs.io/en/stable/

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.0.0rc1.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

PyGithub-2.0.0rc1-py3-none-any.whl (346.1 kB view details)

Uploaded Python 3

File details

Details for the file PyGithub-2.0.0rc1.tar.gz.

File metadata

  • Download URL: PyGithub-2.0.0rc1.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for PyGithub-2.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 10aeb79aaab677a1f12d15530b964bf0fbfa69f5417da77fc7bc7f4a1c48eef1
MD5 04e073e98c33b2b7834afa1bb33aebe3
BLAKE2b-256 4e90d233f45d08243401ec8e3c033ea1970ba5495ff7b8bb85fc761db8d48f6b

See more details on using hashes here.

File details

Details for the file PyGithub-2.0.0rc1-py3-none-any.whl.

File metadata

  • Download URL: PyGithub-2.0.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 346.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for PyGithub-2.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 0b6c327fe24f02712c3f8eb9eb45558c00b74ae3275498a4b3dc9ad9abc1ca62
MD5 ef9dd95b46080ed150492eeb25adefca
BLAKE2b-256 ca2384ea685ce77b8c34f9ad24372fa22218f0a6b82ad61cdd754eef41bfae73

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page