import pathlib


def get_version(rel_path):
    """Get the version of the library
    Args:
        rel_path (str): Relative path to __init__.py with version.
    Returns:
        str: Version of library
    """
    for line in pathlib.Path(rel_path).open('r').read().splitlines():
        if line.startswith('__version__'):
            delim = '"' if '"' in line else "'"
            return line.split(delim)[1]
    else:
        raise RuntimeError("Unable to find version string.")