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

Uploaded Source

Built Distribution

PyGithub-1.59.0-py3-none-any.whl (342.1 kB view details)

Uploaded Python 3

File details

Details for the file PyGithub-1.59.0.tar.gz.

File metadata

  • Download URL: PyGithub-1.59.0.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-1.59.0.tar.gz
Algorithm Hash digest
SHA256 6e05ff49bac3caa7d1d6177a10c6e55a3e20c85b92424cc198571fd0cf786690
MD5 174b98f79d89bd466f2966754ffc30d8
BLAKE2b-256 929011de38774314242ddfb5637a7cf9c80937c7e898699b8e63b407c212513e

See more details on using hashes here.

File details

Details for the file PyGithub-1.59.0-py3-none-any.whl.

File metadata

  • Download URL: PyGithub-1.59.0-py3-none-any.whl
  • Upload date:
  • Size: 342.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-1.59.0-py3-none-any.whl
Algorithm Hash digest
SHA256 126bdbae72087d8d038b113aab6b059b4553cb59348e3024bb1a1cae406ace9e
MD5 1b063467aa1cc6e1df9e64e5d0f30699
BLAKE2b-256 8199df45c40bf862817354b06bb25b45cd01b98a6e2849969926943ecf8ffb20

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