An incomplete Python 3 wrapper for the GitHub API
Project description
commitment
An incomplete Python 3 wrapper for the GitHub API.
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
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')
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
commitment-3.0.0.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for commitment-3.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26163e7abc99798342b589a4699d1856f808ae770855b5a7fe59b3db2d614976 |
|
MD5 | 5227679c7302c5a10563acccbece56de |
|
BLAKE2b-256 | 44d04ec88facb1785f8312e2651f440755570f965a70f3bc68720b821b66f3ba |