class_docstr: PaddleHub server source
  
  Args:
      url(str) : Url of the server
      timeout(int) : Request timeout
class_docstr_tok: ["PaddleHub","server","source","Args",":","url","(","str",")",":","Url","of","the","server","timeout","(","int",")",":","Request","timeout"]
docstr: Search PaddleHub Resource
  
  Args:
      type(str) : Resource type
      name(str) : Resource name
      version(str) : Resource version
docstr_tok: ["Search","PaddleHub","Resource","Args",":","type","(","str",")",":","Resource","type","name","(","str",")",":","Resource","name","version","(","str",")",":","Resource","version"]
code: def search_resource(
      self, type: str, name: str, version: str = None
  ) -> List[dict]:
      """
      Search PaddleHub Resource
  
      Args:
          type(str) : Resource type
          name(str) : Resource name
          version(str) : Resource version
      """
      params = {"environments": platform.get_platform_info()}
  
      params["word"] = name
      params["type"] = type
      if version:
          params["version"] = version
  
      # Delay module loading to improve command line speed
      import paddle
  
      paddle_version = paddle.__version__.split("-")[0]
      hub_version = paddlehub.__version__.split("-")[0]
      if paddle_version == "0.0.0":  # develop version
          paddle_version = "66.0.0"
      if hub_version == "develop":  # develop version
          hub_version = "66.0.0"
      params["hub_version"] = hub_version
      params["paddle_version"] = paddle_version
  
      result = self.request(path="search", params=params)
  
      if result["status"] == 0 and len(result["data"]) > 0:
          results = []
          for module_info in result["data"]:
              should_skip = False
              if module_info["paddle_version"]:
                  paddle_version_intervals = convert_version(
                      module_info["paddle_version"]
                  )
                  for module_paddle_version in paddle_version_intervals:
                      if not Version(paddle_version).match(
                          module_paddle_version
                      ):
                          should_skip = True
              if module_info["hub_version"]:
                  hub_version_intervals = convert_version(
                      module_info["hub_version"]
                  )
                  for module_hub_version in hub_version_intervals:
                      if not Version(hub_version).match(
                          module_hub_version
                      ):
                          should_skip = True
              if should_skip:
                  continue
              results.append(module_info)
          if results:
              return results
      return None
  
file_path: PaddleHub/paddlehub/server/server_source.py
imports: import json
  from typing import List
  import requests
  import paddlehub
  from paddlehub.utils import platform
  from paddlehub.utils.utils import convert_version
  from paddlehub.utils.utils import Version
label_desc: Use image node_id 3 for calling the ServerSource obj's underlying member method code with example usage: obj.search_resource(type, name, version) and returns: None, results