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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

github3apps.py-0.1.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file github3apps.py-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for github3apps.py-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b4c3e8e90451c2576204416ceb2494976eced015b8738981d6b0a6c0a014edaa
MD5 870a45ba6dcf8be2d4e10443c4bccd6c
BLAKE2b-256 bea2a74dfc913ed33d4c2c57d16cf9f96b82f9f59c6ba04834f026c9ce1a2928

See more details on using hashes here.

Supported by

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