def get_version(package):
    init_py = open(os.path.join(package, '__init__.py')).read()
    return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
Check if s is an string in strList and raise a ValueError if it is not.
dataset/ETHPy150Open django-json-api/django-rest-framework-json-api/setup.py/get_version--crossover with--dataset/ETHPy150Open charanpald/APGL/apgl/util/Parameter.py/Parameter.checkString