"Socle de fonctions utilisées dans les scripts python de gestion d'infrastructure."
Project description
scrippy_git
Git client for the Scrippy
framework.
Prerequisites
Python Modules
List of Required Modules
The modules listed below will be automatically installed.
- GitPython
Installation
Manual
git clone https://codeberg.org/scrippy/scrippy-git.git
cd scrippy-git
python -m pip install -r requirements.txt
make install
With pip
pip install scrippy-git
Usage
The scrippy_git.git
module provides the Repo
object for easy manipulation of a Git repository.
import os
from scrippy_git import git
username = "git"
host = "gitlab.monty.py"
port = 2242
reponame = "luiggi.vercotti/monty_python.git"
branch = "master"
repo = git.Repo(username, host, port, reponame)
local_path = os.path.join(workspace_path, "monty_python")
repo.clone(branch=branch, path=local_path)
test_fname = os.path.join(local_path, "dead_parrot.txt")
with open(test_fname, mode="w") as test_file:
test_file.write("Nobody expects the Spanish inquisition !")
commit_message = "Inquisition shall not be expected"
repo.commit_push(commit_message)
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
scrippy-git-1.1.75.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for scrippy_git-1.1.75-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a012f186467dc86873d344f6d951832b9c64756c70cc8d219e7a8b672a67e3b3 |
|
MD5 | e19a3f7bb12b1cf54f9674367a53d731 |
|
BLAKE2b-256 | 3505f670724a98b79f040a6da429580ef1a9a68edd2fc5c5d1ee0ba1634a830f |