Functions:
- format_version – Format a version using a format string.
- get_package_version – Get the version of a package.
- read_version_from_pyproject_toml – Read the version from a pyproject.toml file. Requires the version to be statically defined.
format_version(version, format_string)Format a version using a format string.
Parameters:
Returns:
str– (str: The formatted 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.
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.