commitment-3.0.0
توضیحات
An incomplete Python 3 wrapper for the GitHub API
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | commitment-3.0.0 |
| نام | commitment |
| نسخه کتابخانه | 3.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | chris48s |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/chris48s/commitment |
| آدرس اینترنتی | https://pypi.org/project/commitment/ |
| مجوز | MIT |
# commitment

[](https://codecov.io/gh/chris48s/commitment)




An incomplete Python 3 wrapper for the [GitHub API](https://developer.github.com/v3/).
Note this project does not aim to provide a complete abstraction over the GitHub API - just a few high-level convenience methods for pushing data to a GitHub repo.
## Installation
`pip install commitment`
## Usage
Generate a GitHub API key: https://github.com/settings/tokens
```python
from commitment import GitHubCredentials, GitHubClient
credentials = GitHubCredentials(
repo="myuser/somerepo",
name="myuser",
email="someone@example.com",
api_key="f00b42",
)
client = GitHubClient(credentials)
client.create_branch('my_new_branch', base_branch='master')
client.push_file('Hello World!', 'directory/filename.txt', 'my commit message', branch='my_new_branch')
client.open_pull_request('my_new_branch', 'title', 'body', base_branch='master')
```
نیازمندی
| مقدار | نام |
|---|---|
| >=2.0.0,<3.0.0 | requests |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<4.0 | Python |
نحوه نصب
نصب پکیج whl commitment-3.0.0:
pip install commitment-3.0.0.whl
نصب پکیج tar.gz commitment-3.0.0:
pip install commitment-3.0.0.tar.gz