Pygit
Installation:
pip install Pygitcli
Here is an example code to perform various git commands:-
"""
===============
Pygitcli
===============
This example shows how to use the Pygitcli module. We will demonstrate how
to perform various git commands.
First, some imports.
"""
from Pygitcli.git import Git
###############################################################################
# Now let's initialize the Git class
# We need to provide the path to the target directory
git = Git(r'D:\test_directory')
###############################################################################
# Next we will initialize an empty git directory in the target directory
repo_info = ['https://github.com/test_user/test_repo.git', 'master']
git.init_repo(repo_info)
###############################################################################
# Next, we'll perform various git commands
git.add('test_file.txt')
git.commit('test_file.txt')
git.pull(repo_info)
git.push(repo_info)
###############################################################################
# There are some utility functions in the Git class as well
git.create_readme() # creates a README.md in the target directory
# Set remote URL, branch
git.set_remote(url='https://github.com/test_user/test_repo.git')
git.set_branch(branch='master', new=True) # If the branch already exists set new to False
# Get remote repository information (URL, branch)
url = git.get_remote()
branch = git.get_branch()
Change Log
0.0.1 (13/12/2020)
- First Release
0.0.4 (13/12/2020)
- Changed Documentation
0.0.6 (30/05/2021)
- Code cleanup
- Bug Fixes
- More git commands!
Metadata
Release files for Pygitcli 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| Pygitcli-0.0.6.tar.gz | 4.5 kB | Without provenance | Details |
Release files / Pygitcli-0.0.6.tar.gz
| Download URL | Pygitcli-0.0.6.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
910e39ee01f893fc826eeddaf7ae88d24f23ccef7426fd054695cc1058e7c4b6
|
|
BLAKE2b-256 checksum How to use checksums |
d4233ef10c170368d7897f96a10beb6864a74485bf66479b74de9d3e7f48386b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2
|
Security for Pygitcli 0.0.6
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.