Skip to main content

Summary

vcsinfo gathers information about a source tree, supporting Git, Mercurial, and Perforce working directories.

Installation

pip install vcsinfo

Development

For development, use uv to install dependencies:

uv sync

Usage

Example usage using the vcsinfo project itself (git backend):

import vcsinfo

data = vcsinfo.detect_vcs(my_path)
data.name  # project name: 'vcsinfo'
data.branch  # branch name: 'main'
data.id  # native commit identification: '4bb323148e43543247afe066db0dbac0fcf45537'
data.upstream_repo  # upstream repo url: 'git@github.com/adobe/vcsinfo.git'
data.user  # user who performed the commit: 'saville'
data.id_short  # a short representation of the id: '4bb323'
data.number  # same as id if commits have increasing numbers, otherwise simulated an increasing commit number: 77
data.modified  # none if no local modifications, otherwise the epoch seconds of the most recently modified file: 1629746987
data.release  # string representing the current state of the branch: '77.I4bb323.M1629746987'
data.id_string  # string providing a unique id of branch and release: 'main-77.I4bb323.M1629746987'

# Retrieves a tuple of lists of modified changes in the changeset, see code
# for return format
data.status()

# List the files known to the VCS
data.list_files()

# Retrieves VCS information as a dict, optionally including full file information
data.info()
data.info(include_files=True)

Metadata

Release files for vcsinfo 2.2.116

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vcsinfo 2.2.116
File Size Uploaded Provenance Actions
vcsinfo-2.2.116.tar.gz 10.8 kB Without provenance Details for vcsinfo-2.2.116.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vcsinfo 2.2.116
File Interpreter ABI Platform Actions
vcsinfo-2.2.116-py3-none-any.whl Python 3 none any Details for vcsinfo-2.2.116-py3-none-any.whl

Total release size: 25.6 kB

Release files / vcsinfo-2.2.116.tar.gz

Download URL vcsinfo-2.2.116.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d107be12103fd954e0f31ef6587abeb33d6288a060bd0cc983b90331df98883f
BLAKE2b-256 checksum
How to use checksums
e80895bac9ff758c238966480d5719396ece71e8312af39c44103f93f6bf29de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / vcsinfo-2.2.116-py3-none-any.whl

Download URL vcsinfo-2.2.116-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19909aa53200f52ef7403e6fd3ae3a2810c56542ac4e55c453dc8989b8a119db
BLAKE2b-256 checksum
How to use checksums
32e46e3a9709245522d9cf0595fb95833a34063d49114551443842e98c682ff8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for vcsinfo 2.2.116

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page