Get the local installed version.
189514
async def get_device_info(self, custom_attributes=None):
        """"""
        await self.get_geofences()
        await self.get_devices()
        await self.get_positions()
        devinfo = {}
        try:  # pylint: disable=too-many-nested-blocks
            for dev in self._devices or []:
                for pos in self._positions or []:
                    if pos["deviceId"] == dev.get("id"):
                        uid = dev.get("uniqueId")
                        devinfo[uid] = {}
                        nested = pos.get("attributes", {})

                        for attribute in ATTRIBUTES["position"]:
                            key = ATTRIBUTES["position"][attribute]
                            devinfo[uid][attribute] = pos[key]

                        for attribute in ATTRIBUTES["device"]:
                            key = ATTRIBUTES["device"][attribute]
                            devinfo[uid][attribute] = dev[key]

                        devinfo[uid]["battery"] = nested.get("batteryLevel")
                        devinfo[uid]["motion"] = nested.get("motion")

                        if custom_attributes is not None:
                            for attr in custom_attributes:
                                if attr in nested:
                                    attrvalue = nested.get(attr)
                                    devinfo[uid][attr] = attrvalue
                        try:
                            geofence = self.geofences[dev["geofenceIds"][0]]
                        except IndexError:
                            geofence = None

                        devinfo[uid]["geofence"] = geofence
            if devinfo:
                self._device_info = devinfo
            else:
                self._device_info = self._device_info
            _LOGGER.debug(self._device_info)
        except KeyError as error:
            _LOGGER.error("Error combining data from Traccar, %s", error)
134862
def get_version(self, service_id, version_number):
		""""""
		content = self._fetch("/service/%s/version/%d" % (service_id, version_number))
		return FastlyVersion(self, content)
1290970
def get_version():
    """"""
    try:
        # Try with the package manager, if present
        from pkg_resources import resource_string
        return resource_string(__name__, "VERSION.txt").decode('utf8').strip()
    except Exception:
        # If the package manager is not present, try reading the file
        version = os.path.join(os.path.dirname(__file__), "VERSION.txt")
        with open(version, "r") as f:
            return f.readlines()[0].strip()
1324252
def version_downloads(self):
        """"""
        ret = OrderedDict()
        for release, info in self.release_info:
            download_count = sum(file_['downloads'] for file_ in info)
            ret[release] = download_count
        return ret
658535
def _get_version():
    """"""
    with open(os.path.join(os.path.dirname(__file__), PACKAGE_NAME, 'VERSION'), 'rb') as f:
        version = f.read().decode('ascii').strip()
    return version
1097757
def get_version(with_git_hash=True, refresh_hash=False):
    """"""
    version = __version__
    if with_git_hash:
        global INDRA_GITHASH
        if INDRA_GITHASH is None or refresh_hash:
            with open(devnull, 'w') as nul:
                try:
                    ret = check_output(['git', 'rev-parse', 'HEAD'],
                                       cwd=dirname(__file__), stderr=nul)
                except CalledProcessError:
                    ret = 'UNHASHED'
            INDRA_GITHASH = ret.strip().decode('utf-8')
        version = '%s-%s' % (version, INDRA_GITHASH)
    return version
1274432
def package_version(filename, varname):
    """"""
    _locals = {}
    with open(filename) as fp:
        exec(fp.read(), None, _locals)
    return _locals[varname]
627197
def get_version():
    
    if not INSTALLED:
        try:
            with open('version.txt', 'r') as v_fh:
                return v_fh.read()
        except Exception:
            warnings.warn(
                'Unable to resolve package version until installed',
                UserWarning
            )
            return '0.0.0'  #can't parse version without stuff installed

    return p_version.get_version(HERE)
1157290
def get_version(file_name='beautysh/__init__.py'):
    """"""
    with open(file_name) as v_file:
        for line in v_file:
            if "__version__" in line:
                return eval(line.split('=')[-1])
404554
def get_version(package_name, version_file='_version.py'):
    """"""
    filename = os.path.join(os.path.dirname(__file__), package_name, version_file)
    with open(filename, 'rb') as fp:
        return fp.read().decode('utf8').split('=')[1].strip(" \n'")
133913
def _get_version(name, results):
    '''
    
    '''
    for line in salt.utils.itertools.split(results, '\n'):
        if not line:
            continue
        try:
            pkgname, pkgver = line.rsplit('-', 1)
        except ValueError:
            continue
        if pkgname == name:
            return pkgver
    return None
883643
def _parse_local_version(local):
    
    if local is not None:
        return tuple(
            part.lower() if not part.isdigit() else int(part)
            for part in _local_version_separators.split(local)
        )
764812
def get_version():
    
    setup_versioneer()
    clean_cache()
    import versioneer
    version = versioneer.get_version()
    parsed_version = parse_version(version)
    if '*@' in str(parsed_version):
        import time
        version += str(int(time.time()))
    return version
662462
def get_q_version(q_home):
    """"""
    with open(os.path.join(q_home, 'q.k')) as f:
        for line in f:
            if line.startswith('k:'):
                return line[2:5]
    return '2.2'
1312712
def getVersionNumber(self):
        """"""
        print '%s call getVersionNumber' % self.port
        versionStr = self.__sendCommand(WPANCTL_CMD + 'getprop -v NCP:Version')[0]

        return self.__stripValue(versionStr)
1160193
def get_version():
    
    # "Spoof" the ``setup.py`` helper modules.
    sys.modules["setup_helpers"] = object()
    sys.modules["setup_helpers_macos"] = object()
    sys.modules["setup_helpers_windows"] = object()
    filename = os.path.join(_ROOT_DIR, "setup.py")
    loader = importlib.machinery.SourceFileLoader("setup", filename)
    setup_mod = loader.load_module()
    return setup_mod.VERSION
889928
def get_online_version ():
    """"""
    session = requests.session()
    page = urlopen(UPDATE_URL, session)
    version, url = None, None
    for line in page.text.splitlines():
        if line.startswith(VERSION_TAG):
            version = line.split(':', 1)[1].strip()
        elif line.startswith(URL_TAG):
            url = line.split(':', 1)[1].strip()
            url = url.replace('${version}', version)
    return version, url