Skip to main content

githubapps.py

GitHub license GitHub issues GitHub forks GitHub stars PyPI version Python Versions Downloads

A Python wrapper for the Github Apps API

installing

Install and update using pip:

pip install githubapps.py

examples

A simple example.

Sync

import githubapps
def main():
    with open('env/private.key', 'rb') as f_private:
        private_key = f_private.read()
    with open('env/app_id.key', 'r') as f_app_id:
        app_id = f_app_id.read()
    with open('env/installation_id.key', 'r') as f_installation_id:
        installation_id = f_installation_id.read()
    client_secret = private_key
    auth = githubapps.RequestsAuth(app_id, installation_id, client_secret)
    access_token = auth.get_access_token()
    print(access_token)

if __name__ == "__main__":
    main()

Async

import githubapps
import asyncio

async def main():
    with open('env/private.key', 'rb') as f_private:
        private_key = f_private.read()
    with open('env/app_id.key', 'r') as f_app_id:
        app_id = f_app_id.read()
    with open('env/installation_id.key', 'r') as f_installation_id:
        installation_id = f_installation_id.read()
    client_secret = private_key
    auth = githubapps.AiohttpAuth(app_id, installation_id, client_secret)
    access_token = await auth.get_access_token()
    print(access_token)

if __name__ == "__main__":
    asyncio.run(main())

Release files for githubapps.py 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for githubapps.py 1.1.0
File Size Uploaded
githubapps.py-1.1.0.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for githubapps.py 1.1.0
File Interpreter ABI Platform
githubapps.py-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release files / githubapps.py-1.1.0.tar.gz

Download URL githubapps.py-1.1.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
354f8a12af26589812aeddff280569c4530309e524639ea3d865953a07ca76fa
BLAKE2b-256 checksum
How to use checksums
c3228c946cfc2de444cbfd8251531bc46db600deb4d810e93d3917d71b0f1eba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.2

Release files / githubapps.py-1.1.0-py3-none-any.whl

Download URL githubapps.py-1.1.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05615a76a27b90ac04dd1a5c3cc4d1fdc4afcb5426c44b47001d898a8f689fe6
BLAKE2b-256 checksum
How to use checksums
fa9bd162735b60a93ec3f24cb7ef96fe45651e6ccfb7fb5795832b566f4123ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.2

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page