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

Uploaded Source

Built Distribution

scrippy_git-1.1.72-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for scrippy-git-1.1.72.tar.gz
Algorithm Hash digest
SHA256 b91c35cdd3aed3c84aed79354640b1bd41af8c49e9a1fb81338a96dc4e8c0dee
MD5 61e5293835682c0b7d09ba8eeb151f18
BLAKE2b-256 dd3d7a0dba56374e7fd96dce1ec238c6330a9346f3dd19351a4920d9c06abcde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scrippy_git-1.1.72-py3-none-any.whl
Algorithm Hash digest
SHA256 7e1e13a526d0448c829643b506c25a6f723b9ca731115adbab46ab2af1f9e6c8
MD5 50b1bd10cc6049e60ac59b75c833d252
BLAKE2b-256 31ec7ea002814222327c5763630a099933acb1d462c213e77a480ebe4c9215f0

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