Skip to main content

commitment

Run tests codecov PyPI Version License Python Compatibility 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')

Versioning

commitment follows semantic versioning.

From version 4 onwards, commitment will drop compatibility with unsupported python versions without incrementing the major version. This is in line with common practice in the python community.

Metadata

Release files for commitment 4.1.1

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

Source distribution (sdist)

Source distribution for commitment 4.1.1
File Size Uploaded Provenance Actions
commitment-4.1.1.tar.gz 3.7 kB With provenance Details for commitment-4.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for commitment 4.1.1
File Interpreter ABI Platform Actions
commitment-4.1.1-py3-none-any.whl Python 3 none any Details for commitment-4.1.1-py3-none-any.whl

Total release size: 8.3 kB

Release files / commitment-4.1.1.tar.gz

Download URL commitment-4.1.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
56b49bd473576caf44b936113ad19441c315d67bde9fd85197dd42c475ddaab4
BLAKE2b-256 checksum
How to use checksums
4001206cd6d206ef8e41dbcfe3cf82798ad312b1b1312256219396ba40682b64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2025.

Transparency log

Release files / commitment-4.1.1-py3-none-any.whl

Download URL commitment-4.1.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12b24e14f7f6948e2c5b2d32e2ca8c7ccd6f00dcff417470de2574743778ebad
BLAKE2b-256 checksum
How to use checksums
fbe259652974f907147c2b8eca9244819bf2c5e843d9cc400dc0f6fb0caccce6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2025.

Transparency log

Security for commitment 4.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for commitment-4.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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