New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

commitment

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commitment

An incomplete Python 3 wrapper for the GitHub API

  • 4.0.0
  • PyPI
  • Socket score

Maintainers
1

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')

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc