Socket
Socket
Sign inDemoInstall

divlibgithub3apps

Package Overview
Dependencies
7
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    divlibgithub3apps

Access the Github API as an Application


Maintainers
1

Readme

github3apps.py

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

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

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc