import pkg_resources


def get_package_version(package):
    """Get installed package version

    # Arguments
      package: package name. Example: `kipoi`

    # Returns
      (str) if the package is installed and None otherwise
    """
    try:
        return pkg_resources.get_distribution(package).version
    except pkg_resources.DistributionNotFound:
        return None