code: def get_version():
          
          version_desc = open(os.path.join(os.path.abspath(APISettings.VERSION_FILE)))
          version_file = version_desc.read()
  
          try:
              version = re.search(r"version=['\"]([^'\"]+)['\"]", version_file).group(1)
              return version
          except FileNotFoundError:
              Shell.fail('File not found!')
              raise FileNotFoundError
          except ValueError:
              Shell.fail('Version not found in file ' + version_file + '!')
              raise ValueError
          finally:
              version_desc.close()
docs: Return version from setup.py