| 297 | return json.dumps(response['environments'], indent=1) |
| 298 | |
| 299 | def list_languages(self, client): |
| 300 | response = client.get_supported_languages() |
| 301 | table = [] |
| 302 | if "error" not in response: |
| 303 | table.append("{:<25} {:<35}".format('Name', 'Description')) |
| 304 | for lang in response: |
| 305 | table.append("{:<25} {:<35}".format(lang['name'], lang['display_name'])) |
| 306 | else: |
| 307 | table.append(json.dumps(response)) |
| 308 | return table |
| 309 | |
| 310 | def getBuildLogs(self, user, algo, client): |
| 311 | api_response = client.algo(user + '/' + algo).get_builds() |