Skip to main content

An incomplete Python 3 wrapper for the GitHub API

Project description

commitment

Build Status Coverage Status PyPI Version License Python Support Code style: black

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-2.0.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

commitment-2.0.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file commitment-2.0.2.tar.gz.

File metadata

  • Download URL: commitment-2.0.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.6.8 Linux/4.15.0-65-generic

File hashes

Hashes for commitment-2.0.2.tar.gz
Algorithm Hash digest
SHA256 6b1d4ea6013df99786794c3a5ba8dd46d87f2ac84f0569c09131dcec273f75dd
MD5 5bdc5f4a7bf996bd285e6122dc240151
BLAKE2b-256 b5dcca126a4cc5ce047dc9ac43773e7df2e0f7fa35702ad29ce32f74353ef2ee

See more details on using hashes here.

File details

Details for the file commitment-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: commitment-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.6.8 Linux/4.15.0-65-generic

File hashes

Hashes for commitment-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fdfb6cd5e44dde900a7a1d7e3215bb5c07589568b3a5403583a6b6f5c99e83d7
MD5 7f00a4113426964f8825cecbd7ac33fd
BLAKE2b-256 7bc33d624f891a1052d2d71bb286df491d7d3363bbf592107a0f64f3b2338931

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