code: def key_type(key, host=None, port=None, db=None, password=None):
      '''
      Get redis key type
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' redis.type foo
      '''
      server = _connect(host, port, db, password)
      return server.type(keyf key_type(key, host=None, port=None, db=None, password=None):
      '''
      Get redis key type
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' redis.type foo
      '''
      server = _connect(host, port, db, password)
      return server.type(key)
docs: Get redis key type
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' redis.type foo