Skip to main content

Access the Github API as an Application

Project description

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

Project details


Download files

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

Source Distribution

divlibgithub3apps-1.0.8.tar.gz (4.5 kB view details)

Uploaded Source

Built Distributions

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

divlibgithub3apps-1.0.8-py3.10.egg (6.8 kB view details)

Uploaded Egg

divlibgithub3apps-1.0.8-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file divlibgithub3apps-1.0.8.tar.gz.

File metadata

  • Download URL: divlibgithub3apps-1.0.8.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for divlibgithub3apps-1.0.8.tar.gz
Algorithm Hash digest
SHA256 2e8d76c9de218c11f03e6dce01c80d2ff3bd5ba69a08acb96bd73222cc11e63c
MD5 1b630d4880ab4cf974dde872a9688088
BLAKE2b-256 735d70cd04a742813e8634f6e3da42593caee95c7488d488e665ea104a5e2371

See more details on using hashes here.

File details

Details for the file divlibgithub3apps-1.0.8-py3.10.egg.

File metadata

  • Download URL: divlibgithub3apps-1.0.8-py3.10.egg
  • Upload date:
  • Size: 6.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for divlibgithub3apps-1.0.8-py3.10.egg
Algorithm Hash digest
SHA256 8b0366e5ce7b43c80326ff5200e2bf213c6a6a4699edd4ac1be4245356b9de6a
MD5 0c67ba6cb642396589e7d705d37cc72b
BLAKE2b-256 7bca8e7641e70b03794accd8d9f88bacfc9e059a03a1c8b32ec5720dabba0fde

See more details on using hashes here.

File details

Details for the file divlibgithub3apps-1.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for divlibgithub3apps-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a55c99daf0d96c95cdfee5b292c1bbb490de78348e987c55c43ade90cc3c820a
MD5 bf22c98ad54491e2292f72d6235a0bd3
BLAKE2b-256 ea1903ae1a2e4d5ab53a8fffefb67ef7bcb9f6e96fb182bb384e57d4c9a6dceb

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