Skip to main content

Access the Github API as an Application

Project description

This project is an extension to the github3.py project, with the purpose of enabling GitHub Application development.

Using this library developers can access all of the special App endpoints as well as pull out a github3.py client authenticated by a specific installation.

Usage

Connect to Github as Application

To connect you need to pass the app id and the location of your app’s private key.

from github3apps import GithubApp

gha = GithubApp(app_id, path_to_private_key)
gha.set_user_agent('MyApp')
gha.get_app()

List Available Installations

This returns the list of installations IDs available to your application.

from github3apps import GithubApp

gha = GithubApp(app_id, path_to_private_key)
installation_ids = gha.get_installations()

Get Repositories Available to Installation

This returns the list of repositories available to your specific installation.

from github3apps import GithubApp

gha = GithubApp(app_id, path_to_private_key)

installation = gha.get_installation(installation_id)
installation.get_repositories()

Comminicate with Github API as Installation

This returns a github3.py client already authenticated against a specific installation.

from github3apps import GithubApp

gha = GithubApp(app_id, path_to_private_key)
installation = gha.get_installation(installation_id)
gh = installation.get_github3_client()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
github3apps.py-0.1.3-py3-none-any.whl (3.8 kB) Copy SHA256 hash SHA256 Wheel py3

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page