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

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.12.0b29.tar.gz (33.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libvcs-0.12.0b29-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: libvcs-0.12.0b29.tar.gz
  • Upload date:
  • Size: 33.6 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.0b29.tar.gz
Algorithm Hash digest
SHA256 bc903be8b005eee26f605ea0b654429edfd01c3c8b6892762db52800eb6f1e4d
MD5 440442d1fc21e2445dc6b0347cb20291
BLAKE2b-256 c71f33d4f0a38b425563c3c6be285d6c62efe81fec46a4146cfa733b6b29e3d3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: libvcs-0.12.0b29-py3-none-any.whl
  • Upload date:
  • Size: 31.5 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.0b29-py3-none-any.whl
Algorithm Hash digest
SHA256 b86d9f44355c057f4e6adf856e3e08ad9e696464d7c9c62cf152d3363ba6c155
MD5 ed4433d3f1d7cb5fd2a6d2476d416fe4
BLAKE2b-256 e1a19e8d1c3cc58de5b2d69aeb3b4569531a9795b37023de6562c2b295146954

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page