Lite, typed, python library wrapper for git, svn, mercurial, etc.
Project description
libvcs
·
libvcs is a lite, typed, pythonic wrapper for
git
, hg
, and svn
. Powers vcspull.
Setup
$ pip install --user libvcs
Open up python:
$ python
Or for nice autocompletion and highlighting:
$ pip install --user ptpython
$ ptpython
Commands (experimental)
Simple subprocess
wrappers around git(1)
,
hg(1)
, svn(1)
. Here is Git
w/
Git.clone
:
import pathlib
from libvcs.cmd.git import Git
git = Git(dir=pathlib.Path.cwd() / 'my_git_repo')
git.clone(url='https://github.com/vcs-python/libvcs.git')
Projects
Create a
GitProject
object
of the project to inspect / checkout / update:
import pathlib
from libvcs.projects.git import GitProject
repo = GitProject(
url="https://github.com/vcs-python/libvcs",
dir=pathlib.Path().cwd() / "my_repo",
remotes={
'gitlab': 'https://gitlab.com/vcs-python/libvcs'
}
)
Update / clone repo:
>>> r.update_repo()
Get revision:
>>> r.get_revision()
u'5c227e6ab4aab44bf097da2e088b0ff947370ab8'
Donations
Your donations fund development of new features, testing and support. Your money will go directly to maintenance and development of the project. If you are an individual, feel free to give whatever feels right for the value you get out of the project.
See donation options at https://www.git-pull.com/support.html.
More information
- Python support: 3.9+, pypy
- VCS supported: git(1), svn(1), hg(1)
- Source: https://github.com/vcs-python/libvcs
- Docs: https://libvcs.git-pull.com
- Changelog: https://libvcs.git-pull.com/history.html
- API:
libvcs.cmd
: Commandslibvcs.projects
: High-level synchronization commands
- Issues: https://github.com/vcs-python/libvcs/issues
- Test Coverage: https://codecov.io/gh/vcs-python/libvcs
- pypi: https://pypi-hypernode.com/pypi/libvcs
- Open Hub: https://www.openhub.net/p/libvcs
- License: MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file libvcs-0.13.0a16.tar.gz
.
File metadata
- Download URL: libvcs-0.13.0a16.tar.gz
- Upload date:
- Size: 44.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4159f46e4e64a73290148cc2f4c0a015ac4913fb418a24a8efc3da6c37c1ef8d |
|
MD5 | 456e8cceadfa7c1a758a657d97bbd2b5 |
|
BLAKE2b-256 | 78a710bd384ffc2a28164764e45002f7a525130d465f4023171ddbf95a9c2f0f |
Provenance
File details
Details for the file libvcs-0.13.0a16-py3-none-any.whl
.
File metadata
- Download URL: libvcs-0.13.0a16-py3-none-any.whl
- Upload date:
- Size: 41.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e643f7582f90fa69aa4bdf48dbca4c2d5adf1cc7c800d33d596720a64a60c57 |
|
MD5 | 9a841e8130775583491b0661546a4482 |
|
BLAKE2b-256 | b422508eeb96b7e2aa0dc75bb5f94ebda7c316a9f609e4cc76dc2525f120934c |