Skip to content

Version

Functions and classes for handling version numbers.


get_version

get_version(distribution_name)

Get the installed version of a Python distribution.

Parameters:

Name Type Description Default
distribution_name str

Name of the distribution package.

required

Returns:

Type Description
str

The version string.

Source code in src/aibs_informatics_core/utils/version.py
 8
 9
10
11
12
13
14
15
16
17
def get_version(distribution_name: str) -> str:
    """Get the installed version of a Python distribution.

    Args:
        distribution_name: Name of the distribution package.

    Returns:
        The version string.
    """
    return version(distribution_name=distribution_name)