@@ -0,0 +1,889 @@
+import json%0Aimport urllib2%0Aimport urllib%0Aimport os%0Afrom threading import Timer%0A%0Adef call(url, queryParams = %7B%7D):%0A  url = os.environ.get('devicelab_bot_base_url') + url + '?' + urllib.urlencode(queryParams)%0A  return urllib2.urlopen(url)%0A%0Adef callInstallApp(appName):%0A  return call('/install', %7B%0A    'appName': appName,%0A  %7D).read()%0A%0Adef callGetLogs(buildId):%0A  response = call('/build/' + buildId)%0A  return json.load(response)%0A%0Aclass AppInstaller:%0A  def __init__(self, appName):%0A    self.buildId = callInstallApp(appName)%0A    self.logsCount = 0%0A%0A  def checkLogs(self):%0A    logs = callGetLogs(self.buildId)%0A    for i in range(self.logsCount, len(logs)):%0A      print logs%5Bi%5D%0A      if logs%5Bi%5D == 'Done': return%0A    self.logsCount = len(logs)%0A    Timer(1.0, self.checkLogs).start()%0A%0A  def install(self):%0A    Timer(1.0, self.checkLogs).start()%0A%0AAppInstaller(os.environ.get('app_name')).install()%0A

Add python client