code: def read(self, key, array=False, embedded=True):
          
          self.tcex.log.debug('read variable {}'.format(key))
          # if a non-variable value is passed it should be the default
          data = key
          if key is not None:
              key = key.strip()
              key_type = self.variable_type(key)
              if re.match(self._variable_match, key):
                  if key_type in self.read_data_types:
                      # handle types with embedded variable
                      if key_type in ['Binary', 'BinaryArray']:
                          data = self.read_data_types[key_type](key)
                      else:
                          data = self.read_data_types[key_type](key, embedded)
                  else:
                      data = self.read_raw(key)
              else:
                  if key_type == 'String':
                      # replace "\s" with a space only for user input.
                      # using '\\s' will prevent replacement.
                      data = re.sub(r'(?<!\\)\\s', ' ', data)
                      data = re.sub(r'\\\\s', '\\s', data)
  
                  if embedded:
                      # check for any embedded variables
                      data = self.read_embedded(data, key_type)
  
          # return data as a list
          if array and not isinstance(data, list):
              if data is not None:
                  data = [data]
              else:
                  # Adding none value to list breaks App logic. It's better to not request Array
                  # and build array externally if None values are required.
                  data = []
  
          # self.tcex.log.debug(u'read data {}'.format(self.tcex.s(data)))
          return data
docs: Read method of CRUD operation for working with KeyValue DB.
  
          This method will automatically check to see if a single variable is passed
          or if "mixed" data is passed and return the results from the DB. It will also
          automatically determine the variable type to read.
  
          Args:
              key (string): The variable to read from the DB.
              array (boolean): Convert string/dict to Array/List before returning.
              embedded (boolean): Resolve embedded variables.
  
          Returns:
              (any): Results retrieved from DB