Python的高级Git库 Gittle
(编辑:jimmy 日期: 2024/11/30 浏览:3 次 )
Gittle是一个高级纯python git 库。构建在dulwich之上,提供了大部分的低层机制。
Install it
pip install gittle
Examples :
Clone a repository
from gittle import Gittle repo_path = '/tmp/gittle_bare' repo_url = 'git://github.com/FriendCode/gittle.git' repo = Gittle.clone(repo_url, repo_path)
With authentication (see Authentication section for more information) :
auth = GittleAuth(pkey=key) Gittle.clone(repo_url, repo_path, auth=auth)
Or clone bare repository (no working directory) :
repo = Gittle.clone(repo_url, repo_path, bare=True)
Init repository from a path
repo = Gittle.init(path)