Skip to content

Latest commit

 

History

History
56 lines (33 loc) · 1.5 KB

api-reference.md

File metadata and controls

56 lines (33 loc) · 1.5 KB

vspect

Functions:

vspect.format_version

format_version(version, format_string)

Format a version using a format string.

Parameters:

  • version (Version) – The version to format.
  • format_string (str) – The format string to use.

Returns:

  • str – (str: The formatted version).

vspect.get_package_version

get_package_version(package_name)

Get the version of a package.

Parameters:

  • package_name (str) – The name of the package to get the version of.

Returns:

  • Version – The version of the package.

vspect.read_version_from_pyproject_toml

read_version_from_pyproject_toml(path)

Read the version from a pyproject.toml file. Requires the version to be statically defined.

Parameters:

  • path (Path) – The path to the pyproject.toml file, or the directory containing it.

Returns:

  • Version – The version read from the file.