Skip to main content

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

Project description

Build Status License Language

Scrippy, my Scrangourou friend

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: scrippy-git-1.1.73.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.73.tar.gz
Algorithm Hash digest
SHA256 892f51f427e6360892f9d508347be28671353d68f55ea583913aad21e745406a
MD5 38574df7410786c4f553230f76ddba57
BLAKE2b-256 4a3c86e41852e716be226edd3145a9949a638ad4881cab3af3b6ebd7f15f7892

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scrippy_git-1.1.73-py3-none-any.whl
Algorithm Hash digest
SHA256 d6d2dbd89cf376ee6b085eed3bc2552c105d872d70f401e5f22a2569f43f3a27
MD5 2bd73ba90dee3657917e25f20f9e66e3
BLAKE2b-256 4e14b678cfdf870807d002eb225f9b4af146f9a790aca6004914afbe6dfabfef

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