Skip to main content

python binding git command.

Project description

ruff status workflow test

Downloads Downloads Downloads

Fully git command binding for Python.

Features:

🔥 support any git commands, git command with "-" can be replaced with "_" like git rev-parse to git.rev_parse().

🔥 support prompt input with git.prompt = "value".

🔥 auto change path to clone destination.

🔥 custom git binary location git.gitbin = "path/to/git/binary".

🔥 support direct output to stdout or capture output to function return.

🔥 raise exception on non-zero exit code.

🔥 compatible with mypy --strict.

Example

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.

author: Guangrei.

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

Uploaded Source

Built Distribution

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

gitbinding-1.0.6-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gitbinding-1.0.6.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for gitbinding-1.0.6.tar.gz
Algorithm Hash digest
SHA256 8cc46096618049a28517c65fa5dd07bcbe6d6effa8b0cc3f99a3681abf50e45e
MD5 f25b2ed6d4202a174b1c3f1d604c9cf9
BLAKE2b-256 2d52237dab827a99d1695c915c281b3d145efcf1093c1001022be97454d25601

See more details on using hashes here.

File details

Details for the file gitbinding-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: gitbinding-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for gitbinding-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5ae1325f3217e80e339a263a7dd84a4b3e30a491452b83c0fe59c40b8fbce70e
MD5 4d9ae95db67ad1245a6768b1d30f3f07
BLAKE2b-256 4ac0fad414898841780072e0c3747210c6db8a9b5c797c5e5a6a4807268580bd

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