"Socle de fonctions utilisées dans les scripts python de gestion d'infrastructure."
Project description
scrippy_git
Client Git pour le cadriciel Scrippy
.
Prérequis
Modules Python
Liste des modules nécessaires
Les modules listés ci-dessous seront automatiquement installés.
- GitPython
Installation
Manuelle
git clone https://codeberg.org/scrippy/scrippy-git.git
cd scrippy-git.git
sudo python3 -m pip install -r requirements.txt
make install
Avec pip
pip3 install scrippy-git
Utilisation
Le module scrippy_git.git
fournit l'objet Repo
facilitant la manipulation d'un dépôt Git.
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.71.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file scrippy-git-1.1.71.tar.gz
.
File metadata
- Download URL: scrippy-git-1.1.71.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2272b4a4604b3d826e4ee58c3541c40dba3993bf5c84ed3598231c04aeb3c30 |
|
MD5 | e619b4dd8559db58dff0fa048f4334ec |
|
BLAKE2b-256 | ab23cbb68b68a41da8df951b960c8939741de4e76fdb4baff77f161f03febf7a |
File details
Details for the file scrippy_git-1.1.71-py3-none-any.whl
.
File metadata
- Download URL: scrippy_git-1.1.71-py3-none-any.whl
- Upload date:
- Size: 4.7 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 | d3addc2c3525ca300affb4ede1431486e58b94b51fc6ead6fe415af58bc62050 |
|
MD5 | 11762b17c8cfefebeb47eaf9ee799fc8 |
|
BLAKE2b-256 | 98815f99c330922d1f4619a6c843c186e0df7ab348429a9ef6163f3332fd0622 |