"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.74.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file scrippy-git-1.1.74.tar.gz
.
File metadata
- Download URL: scrippy-git-1.1.74.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 567f23f581ceae81794948dac4770039c66bf3b87dc37ace823a0c183c90e772 |
|
MD5 | 6e7df6213a7adf7e7ab460afb8255636 |
|
BLAKE2b-256 | 7191496e7251bd7112e5602f7670a55bfc19ace86cffe80513bec835fe537ee3 |
File details
Details for the file scrippy_git-1.1.74-py3-none-any.whl
.
File metadata
- Download URL: scrippy_git-1.1.74-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01cbf2bdd1e83624f0ac8be0175d8de75f3acd4ca6c9b1a8931a6eb99b4e84f5 |
|
MD5 | dd442ad1a1a715814d815c7c6e1b0179 |
|
BLAKE2b-256 | 90ad45224cdcdc79560cc128e11d77af02522923218ffda00d4ae1050e81d3eb |