Pyrepo is a repository abstraction package which provides a Python API for fetching and managing a variety of repositories.
Install Pyrepo via pip
$ pip install pyrepo
>>> import os
>>> from pyrepo import Repository, git_command
>>> home = os.path.expanduser('~')
>>> repo = Repository(command=git_command,
url='https://github.com/dghubble/pyrepo.git')
>>> repo2 = Repository(import_path="github.com/dghubble/pyrepo")
>>> repo.clone()
>>> repo.update()
Documentation is available here.
To get the source from Github
$ git clone [email protected]:dghubble/pyrepo.git
$ cd pyrepo
$ pip install -r requirements.txt
$ python setup.py develop
If you want to remove the development install
$ cd pyrepo
$ python setup.py develop --uninstall
$ pip install nose
$ nosetests
............
----------------------------------------------------------------------
Ran 14 tests in 0.707s
OK
If you'd like to contact me, feel free to Tweet to @dghubble or email [email protected].