mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
7c6574db4f4359b9a0da7e51df2b62f3ef2aaf38
This is a Python library to access the Gitub V3 API.
Tutorial
First create a Gihub instance:
from github import Github
g = Github( "user", "password" )
Then play with your Github objects:
for repository in g.user().repositories( type = "private" ):
print repository.name
repository.edit( has_wiki = False )
Documentation
Here are the classes encapsulating the API. You can use them without knowing the API itself. If you know what API you need to call, see file Reference.md to understand which class(es) impements it.
User
If g is a Gihub:
g.user()returns the authenticatedUserg.user( name )returns the namedUser
If user is a User:
- cf. paragraph Organizations to access its organizations
- cf. paragraph Repositories to access its repositories
Organizations
If g is a Gihub:
g.organization( name )returns the namedOrganization
If user is a User:
- user.organizations() lists its
Organizations
If org is an Organization:
- cf. paragraph Repositories to access its repositories
Repositories
If owner is a User or an Organization:
owner.repositories( type )lists itsRepositoryiesowner.repository( name )returns the namedRepositoryowner.createRepository( name )creates a new repository and returns the newRepository
If repo is a Repository:
repo.edit()edits the repository (same optional arguments as API)
Description
Typed interactions with the GitHub API v3
https://pygithub.readthedocs.io/
12 MiB
Languages
Python
99.9%