Skip to main content

"Socle de fonctions utilisées dans les scripts python de gestion d'infrastructure."

Project description

Build Status License Language

Scrippy, mon ami le scrangourou

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

Uploaded Source

Built Distribution

scrippy_git-1.1.70-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file scrippy-git-1.1.70.tar.gz.

File metadata

  • Download URL: scrippy-git-1.1.70.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

Hashes for scrippy-git-1.1.70.tar.gz
Algorithm Hash digest
SHA256 f05436f8257043fd15a967bb067ebcfd9cf7f9ce24d2aa71095a1b521bd312a1
MD5 f4f861c35e4a8520982d78732bc92d97
BLAKE2b-256 2da85f9983c878ad17b35e8125c9a1dc6f6d2bb45d813d8b62982701d0723409

See more details on using hashes here.

File details

Details for the file scrippy_git-1.1.70-py3-none-any.whl.

File metadata

File hashes

Hashes for scrippy_git-1.1.70-py3-none-any.whl
Algorithm Hash digest
SHA256 4e500996a3154ed6b4afffce4d46973a00029cf8e9e4afba230add1db7c74f8d
MD5 7c3bcf8e7513869846990e9774468597
BLAKE2b-256 3254bee78c013dd64778808f55a5f3cd8a8955e5634839e25caa0fc9a4ea857d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page