Skip to content

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 libzim library.

  • get_versions

    Get mapping of library names to their versions.

  • print_versions

    Prints the list of libzim and its dependencies along with their versions.

get_libzim_version method descriptor

get_libzim_version() -> str

Retrieves the version string of the libzim library.

Returns:

  • str

    The version of libzim.

get_versions method descriptor

get_versions() -> OrderedDict[str, str]

Get mapping of library names to their versions.

Always includes the libzim library.

Returns:

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.