pyproject_toml_api.version_api package
Submodules
pyproject_toml_api.version_api.version module
version.py
Author: Zack Hankin
Started: 3/03/2023
- pyproject_toml_api.version_api.version.fetch_version(max_folders_up: int = 10, pyproject_folder: Optional[Path] = None, default_version: str = '0.1.0', filename: str = '**/pyproject.toml') Version [source]
Fetches the version number for the pyproject.toml folder no more than 2 up.
- Parameters:
() (filename) –
pyproject_folder (
Optional[str | Path]
) – Set the path if known.max_folders_up (
int
) – Max number of folders up to search. 0 is the given folder.default_version (
str
) – If no version is found, what version do you want returned.
- Returns:
- Release and Version number for project,
using the semantic version style. E.g. “0.1.1”
- Return type:
str
Module contents
__init__.py
Author: Zack Hankin
Started: 4/03/2023
- pyproject_toml_api.version_api.fetch_version(max_folders_up: int = 10, pyproject_folder: Optional[Path] = None, default_version: str = '0.1.0', filename: str = '**/pyproject.toml') Version [source]
Fetches the version number for the pyproject.toml folder no more than 2 up.
- Parameters:
() (filename) –
pyproject_folder (
Optional[str | Path]
) – Set the path if known.max_folders_up (
int
) – Max number of folders up to search. 0 is the given folder.default_version (
str
) – If no version is found, what version do you want returned.
- Returns:
- Release and Version number for project,
using the semantic version style. E.g. “0.1.1”
- Return type:
str