get

获取一条数据

  1. def get(self, hash_key, sort_key, timeout=0):
  2. """
  3. Get value stored in <hash_key, sort_key>.
  4. :param hash_key: (str) which hash key used for this API.
  5. :param sort_key: (str) which sort key used for this API.
  6. :param timeout: (int) how long will the operation timeout in milliseconds.
  7. if timeout > 0, it is a timeout value for current operation,
  8. else the timeout value specified to create the instance will be used.
  9. :return: (tuple<error_types.code.value, str>) (code, value).
  10. code: error_types.ERR_OK.value when data got succeed, error_types.ERR_OBJECT_NOT_FOUND.value when data not found.
  11. value: data stored in this <hash_key, sort_key>
  12. """