divlibgithub3apps-1.0.8
توضیحات
Access the Github API as an Application
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | divlibgithub3apps-1.0.8 |
| نام | divlibgithub3apps |
| نسخه کتابخانه | 1.0.8 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | OneDiversified |
| ایمیل نویسنده | github@onediversified.com |
| آدرس صفحه اصلی | https://github.com/onediversified/div.lib.github3apps |
| آدرس اینترنتی | https://pypi.org/project/divlibgithub3apps/ |
| مجوز | - |
# github3apps.py
This project is an extension to the [github3.py](https://github.com/sigmavirus24/github3.py) project, with the purpose of enabling [GitHub Application](https://developer.github.com/apps/) 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.
```python
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.
```python
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.
```python
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](https://github.com/sigmavirus24/github3.py) client already authenticated against a specific installation.
```python
from github3apps import GithubApp
gha = GithubApp(app_id, path_to_private_key)
installation = gha.get_installation(installation_id)
gh = installation.get_github3_client()
```
نیازمندی
| مقدار | نام |
|---|---|
| >=39.0.2 | cryptography |
| >=3.2.0 | github3.py |
| >=2.6.0 | pyjwt |
| >=2.28.2 | requests |
| - | pypandoc |
| - | twine |
| - | wheel |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl divlibgithub3apps-1.0.8:
pip install divlibgithub3apps-1.0.8.whl
نصب پکیج tar.gz divlibgithub3apps-1.0.8:
pip install divlibgithub3apps-1.0.8.tar.gz