libzim.version
libzim version module
- Get version of libzim and its dependencies
- Print version of libzim and its dependencies
- Get libzim version
Usage:
from libzim.version import get_libzim_version, get_versions, print_versions
major, minor, patch = get_libzim_version().split(".", 2)
for dependency, version in get_versions().items():
print(f"- {dependency}={version}")
print_versions()
Functions:
-
get_libzim_version–Retrieves the version string of the
libzimlibrary. -
get_versions–Get mapping of library names to their versions.
-
print_versions–Prints the list of
libzimand its dependencies along with their versions.
get_libzim_version
method descriptor
get_libzim_version() -> str
get_versions
method descriptor
get_versions() -> OrderedDict[str, str]
Get mapping of library names to their versions.
Always includes the libzim library.
Returns:
-
OrderedDict[str, str]–A mapping of library names to their versions.
print_versions
method descriptor
print_versions(out: TextIO = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)
Prints the list of libzim and its dependencies along with their versions.
Parameters:
-
out(TextIO, default:<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>) –The output stream to write the version information. Defaults to
sys.stdout.