Skip to main content

python binding git command.

Project description

Fully git command binding for python, compatible with all git and python 2 & 3 version.

Installation

pip3 install gitbinding

Usage

from gitbinding import Git

git = Git(path = None, direct_output = True)
"""
path:
working directory, None = use current directory.

direct_output:
if direct_output set to False, the output is redirect to command/function return.
"""

now you can run any git command like git.init(), git.clone("gitrepo destination"), git.commit(), git.push(),git.config() etc.

git command with "-" can be replaced with "_" like git rev-parse to git.rev_parse()

you can also put git command argument in separate function args like git.clone("gitrepo","destination").

when git.clone() finished without error, the path will automatic move to clone destination.

change git bin

to change git binary location, use:

git.gitbin = "path/to/git/binary"

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

gitbinding-1.0.5.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file gitbinding-1.0.5.tar.gz.

File metadata

  • Download URL: gitbinding-1.0.5.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for gitbinding-1.0.5.tar.gz
Algorithm Hash digest
SHA256 d92c8a42b9fc2e8476d9211a319ef12c150e54eb251c1aa0e3b331fcecd77fb8
MD5 88001f4246675795f5084824dba3a437
BLAKE2b-256 f4301e035a26c0ea027d5df74bf3a12c4efd78f0e88074c1dfa251b4b111a367

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page