Skip to main content

Lite, typed, python library wrapper for git, svn, mercurial, etc.

Project description

libvcs · Python Package License Code Coverage

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

Docs Build Status

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

libvcs-0.14.0a2.tar.gz (44.4 kB view details)

Uploaded Source

Built Distribution

libvcs-0.14.0a2-py3-none-any.whl (42.3 kB view details)

Uploaded Python 3

File details

Details for the file libvcs-0.14.0a2.tar.gz.

File metadata

  • Download URL: libvcs-0.14.0a2.tar.gz
  • Upload date:
  • Size: 44.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for libvcs-0.14.0a2.tar.gz
Algorithm Hash digest
SHA256 a4206f5ea8e56f7acbfcf50886c7ba47ce0527ec77e9c506cd1db57ce5de9890
MD5 0987f3c68fbc52d5141a46118302045b
BLAKE2b-256 4bd28828fd8c52721ab34030efc814f2bc89ea62ae31394dcc99b36d963c7087

See more details on using hashes here.

Provenance

File details

Details for the file libvcs-0.14.0a2-py3-none-any.whl.

File metadata

  • Download URL: libvcs-0.14.0a2-py3-none-any.whl
  • Upload date:
  • Size: 42.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for libvcs-0.14.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 bf11e30214fee80d0a530ddc4d8572d8c31882b96b9afa95f55a4f1b250c15f4
MD5 3e6b50d62290974cdb59314882d41a6c
BLAKE2b-256 e87238dcad2be690c20bf12e5015066078eee89a5b9b8657db11edb2a9d8a266

See more details on using hashes here.

Provenance

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