Skip to main content

vcs abstraction layer

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')

States

Create a GitRepo object of the project to inspect / checkout / update:

import pathlib
from libvcs.states.git import GitRepo

repo = GitRepo(
   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.12.0b28.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

libvcs-0.12.0b28-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file libvcs-0.12.0b28.tar.gz.

File metadata

  • Download URL: libvcs-0.12.0b28.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for libvcs-0.12.0b28.tar.gz
Algorithm Hash digest
SHA256 2045cd5ada91eedeca38dd36ec8fa685ae8d0a2d98367e46598ec4bf0c419b34
MD5 4702d372ba31504ceaf5195a7461f4bb
BLAKE2b-256 d13743dbcf9811e73020521020955582bc4b341d7ecb401b2189f30fcf5bb4ee

See more details on using hashes here.

Provenance

File details

Details for the file libvcs-0.12.0b28-py3-none-any.whl.

File metadata

  • Download URL: libvcs-0.12.0b28-py3-none-any.whl
  • Upload date:
  • Size: 31.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for libvcs-0.12.0b28-py3-none-any.whl
Algorithm Hash digest
SHA256 10c746084afdb1fbbbb45536367797ef2a05a5691fb648dbcd54cc52f677b1ca
MD5 eebae31e03c1098bf8d174874492a034
BLAKE2b-256 e819c187ed10c665858c4613292e18bba814c17a8139d2e300b3870549915929

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