Get a single item
        :param data_type: str
        :param options: dict
        :return: dict|str
768300
def get(self, data_type, options=None):
        
        if options is None:
            options = {}
        response = self._client.session.get(
            '{url}/{type}'.format(
                url=self.endpoint_url, type=data_type
            ),
            params=options
        )
        return self.process_response(response)
111279
def get_items_of_media_type(self, media_type):
        
        return (item for item in self.items if item.media_type == media_type)
1286070
def _parse__item(self, item_type: Type[T], item_file_prefix: str,
                     file_mapping_conf: FileMappingConfiguration = None,
                     options: Dict[str, Dict[str, Any]] = None) -> T:
        

        # for consistency : if options is None, default to the default values of create_parser_options
        options = options or create_parser_options()

        # creating the persisted object (this performs required checks)
        file_mapping_conf = file_mapping_conf or WrappedFileMappingConfiguration()
        obj = file_mapping_conf.create_persisted_object(item_file_prefix, logger=self.logger)
        # print('')
        self.logger.debug('')

        # create the parsing plan
        pp = self.create_parsing_plan(item_type, obj, logger=self.logger)
        # print('')
        self.logger.debug('')

        # parse
        res = pp.execute(logger=self.logger, options=options)
        # print('')
        self.logger.debug('')

        return res
1058947
def get_one(cls, db, *args, **kwargs):
        
        data = db[cls.collection].find_one(*args, **kwargs)
        if data:
            return cls.wrap_incoming(data, db)
        else:
            return None
193654
def valueFromDataset(cls, datatype, value, metadata=None, tmap=None):
        
        if tmap is None:
            tmap = typemap
        obj = cls.fromDataset(datatype, value, metadata=metadata, tmap=tmap)
        return obj.value
1113139
def get_data(self, url, type=GET, params=None):
        
        if params is None:
            params = dict()

        req = self.__perform_request(url, type, params)
        if req.status_code == 204:
            return True

        if req.status_code == 404:
            raise NotFoundError()

        try:
            data = req.json()
        except ValueError as e:
            raise JSONReadError(
                'Read failed from API: %s' % str(e)
            )

        if not req.ok:
            msg = [data[m] for m in ("id", "message") if m in data][1]
            raise DataReadError(msg)

        return data
1275835
def find_or_create_by_name(self, item_name, items_list, item_type):
        
        item = self.find_by_name(item_name, items_list)
        if not item:
            item = self.data_lists[item_type][2](item_name, None)
        return item
1082869
def getItem(self, itemId):
        
        url = "%s/items/%s" % (self.root, itemId)
        return Item(url=url,
                    securityHandler=self._securityHandler,
                    proxy_url=self._proxy_url,
                    proxy_port=self._proxy_port)
291864
def get_list(self, datatype, url, **kwargs):
        """"""
        search_url = [url, '?']
        kwargs.update({'key': self.api_key})
        search_url.append(urlencode(kwargs))
        data = json.loads(urlopen(''.join(search_url)).read())
        return data[datatype]
77389
def GetDataAsObject(self):
    
    if not self._data:
      return None

    if self._data_type in self._STRING_VALUE_TYPES:
      try:
        return self._data.decode('utf-16-le')

      # AttributeError is raised when self._data has no decode method.
      except AttributeError as exception:
        raise errors.WinRegistryValueError((
            'Unsupported data type: {0!s} of value: {1!s} with error: '
            '{2!s}').format(type(self._data), self._name, exception))

      except UnicodeError as exception:
        raise errors.WinRegistryValueError(
            'Unable to decode data of value: {0!s} with error: {1!s}'.format(
                self._name, exception))

    elif (self._data_type == definitions.REG_DWORD and
          self._data_size == 4):
      return self._INT32_LITTLE_ENDIAN.MapByteStream(self._data)

    elif (self._data_type == definitions.REG_DWORD_BIG_ENDIAN and
          self._data_size == 4):
      return self._INT32_BIG_ENDIAN.MapByteStream(self._data)

    elif (self._data_type == definitions.REG_QWORD and
          self._data_size == 8):
      return self._INT64_LITTLE_ENDIAN.MapByteStream(self._data)

    elif self._data_type == definitions.REG_MULTI_SZ:
      try:
        utf16_string = self._data.decode('utf-16-le')
        # TODO: evaluate the use of filter here is appropriate behavior.
        return list(filter(None, utf16_string.split('\x00')))

      # AttributeError is raised when self._data has no decode method.
      except AttributeError as exception:
        raise errors.WinRegistryValueError((
            'Unsupported data type: {0!s} of value: {1!s} with error: '
            '{2!s}').format(type(self._data), self._name, exception))

      except UnicodeError as exception:
        raise errors.WinRegistryValueError(
            'Unable to read data from value: {0!s} with error: {1!s}'.format(
                self._name, exception))

    return self._data
156594
def get(self, option, default=undefined, cast=undefined):
        
        if option in self.repository:
            value = self.repository.get(option)
        else:
            value = default

        if isinstance(value, Undefined):
            raise UndefinedValueError('%s option not found and default value was not defined.' % option)

        if isinstance(cast, Undefined):
            cast = lambda v: v  # nop
        elif cast is bool:
            cast = self._cast_boolean

        return cast(value)
973535
def raw_get(option)
      value = options_storage[option]
      Confo.callable_without_arguments?(value) ? value.call : value
    end
1280482
def get(self, **options):
        
        sub_query = self.with_limit(1)
        options = QueryOptions(sub_query).replace(batch_size=1)
        for result in sub_query.run(**options):
            return result
        return None
645986
def getDataMap(self, intype, pos, name, offset = 0):
        
        if intype == "input":
            vector = self.inputs
        elif intype == "target":
            vector = self.targets
        else:
            raise AttributeError("invalid map type '%s'" % intype)
        return vector[pos][offset:offset+self[name].size]
1191425
def fetch(dataset_uri, item_identifier):
    
    dataset = dtoolcore.DataSet.from_uri(dataset_uri)
    click.secho(dataset.item_content_abspath(item_identifier))
140079
def get_user(self, idvalue, options=None):
        
        options = options or {}
        data = options.copy()
        data['id'] = idvalue
        return self.api_get('user', data)
258498
def get_by_type(self, _type):
        
        r = {}
        for k, v in self.items():
            if get_component_type(k) is _type:
                r[k] = v
        return r