anyscale 0.26.16__py3-none-any.whl → 0.26.18__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. anyscale/anyscale-cloud-setup-gcp.yaml +2 -0
  2. anyscale/anyscale-cloud-setup.yaml +0 -4
  3. anyscale/client/README.md +7 -37
  4. anyscale/client/openapi_client/__init__.py +5 -20
  5. anyscale/client/openapi_client/api/default_api.py +410 -2163
  6. anyscale/client/openapi_client/models/__init__.py +5 -20
  7. anyscale/client/openapi_client/models/{create_session_response.py → i_know_response.py} +51 -51
  8. anyscale/client/openapi_client/models/{session_details.py → i_know_time_series_event.py} +35 -35
  9. anyscale/client/openapi_client/models/job_report.py +199 -0
  10. anyscale/client/openapi_client/models/job_with_report.py +254 -0
  11. anyscale/client/openapi_client/models/{webterminal_list_response.py → jobwithreport_list_response.py} +15 -15
  12. anyscale/commands/cloud_commands.py +71 -0
  13. anyscale/connect_utils/prepare_cluster.py +19 -14
  14. anyscale/controllers/cloud_controller.py +164 -1
  15. anyscale/job/_private/job_sdk.py +22 -24
  16. anyscale/version.py +1 -1
  17. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/METADATA +1 -1
  18. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/RECORD +23 -38
  19. anyscale/client/openapi_client/models/archived_logs_info.py +0 -164
  20. anyscale/client/openapi_client/models/archivedlogsinfo_response.py +0 -121
  21. anyscale/client/openapi_client/models/create_experimental_workspace_from_job.py +0 -123
  22. anyscale/client/openapi_client/models/create_session_from_snapshot_options.py +0 -538
  23. anyscale/client/openapi_client/models/create_session_in_db.py +0 -434
  24. anyscale/client/openapi_client/models/createsessionresponse_response.py +0 -121
  25. anyscale/client/openapi_client/models/external_service_status.py +0 -147
  26. anyscale/client/openapi_client/models/external_service_status_response.py +0 -250
  27. anyscale/client/openapi_client/models/externalservicestatusresponse_response.py +0 -121
  28. anyscale/client/openapi_client/models/monitor_logs_extension.py +0 -100
  29. anyscale/client/openapi_client/models/session_describe.py +0 -175
  30. anyscale/client/openapi_client/models/session_history_item.py +0 -146
  31. anyscale/client/openapi_client/models/sessiondescribe_response.py +0 -121
  32. anyscale/client/openapi_client/models/sessiondetails_response.py +0 -121
  33. anyscale/client/openapi_client/models/sessionhistoryitem_list_response.py +0 -147
  34. anyscale/client/openapi_client/models/update_compute_template.py +0 -146
  35. anyscale/client/openapi_client/models/update_compute_template_config.py +0 -464
  36. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/LICENSE +0 -0
  37. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/NOTICE +0 -0
  38. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/WHEEL +0 -0
  39. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/entry_points.txt +0 -0
  40. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/top_level.txt +0 -0
@@ -1,250 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Managed Ray API
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
15
-
16
- import six
17
-
18
- from openapi_client.configuration import Configuration
19
-
20
-
21
- class ExternalServiceStatusResponse(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
27
-
28
- """
29
- Attributes:
30
- openapi_types (dict): The key is attribute name
31
- and the value is attribute type.
32
- attribute_map (dict): The key is attribute name
33
- and the value is json key in definition.
34
- """
35
- openapi_types = {
36
- 'metrics_dashboard_status': 'ExternalServiceStatus',
37
- 'persistent_metrics_status': 'ExternalServiceStatus',
38
- 'jupyter_noteboook_status': 'ExternalServiceStatus',
39
- 'service_proxy_status': 'ExternalServiceStatus',
40
- 'ray_dashboard_status': 'ExternalServiceStatus',
41
- 'webterminal_status': 'ExternalServiceStatus'
42
- }
43
-
44
- attribute_map = {
45
- 'metrics_dashboard_status': 'metrics_dashboard_status',
46
- 'persistent_metrics_status': 'persistent_metrics_status',
47
- 'jupyter_noteboook_status': 'jupyter_noteboook_status',
48
- 'service_proxy_status': 'service_proxy_status',
49
- 'ray_dashboard_status': 'ray_dashboard_status',
50
- 'webterminal_status': 'webterminal_status'
51
- }
52
-
53
- def __init__(self, metrics_dashboard_status=None, persistent_metrics_status=None, jupyter_noteboook_status=None, service_proxy_status=None, ray_dashboard_status=None, webterminal_status=None, local_vars_configuration=None): # noqa: E501
54
- """ExternalServiceStatusResponse - a model defined in OpenAPI""" # noqa: E501
55
- if local_vars_configuration is None:
56
- local_vars_configuration = Configuration()
57
- self.local_vars_configuration = local_vars_configuration
58
-
59
- self._metrics_dashboard_status = None
60
- self._persistent_metrics_status = None
61
- self._jupyter_noteboook_status = None
62
- self._service_proxy_status = None
63
- self._ray_dashboard_status = None
64
- self._webterminal_status = None
65
- self.discriminator = None
66
-
67
- if metrics_dashboard_status is not None:
68
- self.metrics_dashboard_status = metrics_dashboard_status
69
- if persistent_metrics_status is not None:
70
- self.persistent_metrics_status = persistent_metrics_status
71
- if jupyter_noteboook_status is not None:
72
- self.jupyter_noteboook_status = jupyter_noteboook_status
73
- if service_proxy_status is not None:
74
- self.service_proxy_status = service_proxy_status
75
- if ray_dashboard_status is not None:
76
- self.ray_dashboard_status = ray_dashboard_status
77
- if webterminal_status is not None:
78
- self.webterminal_status = webterminal_status
79
-
80
- @property
81
- def metrics_dashboard_status(self):
82
- """Gets the metrics_dashboard_status of this ExternalServiceStatusResponse. # noqa: E501
83
-
84
-
85
- :return: The metrics_dashboard_status of this ExternalServiceStatusResponse. # noqa: E501
86
- :rtype: ExternalServiceStatus
87
- """
88
- return self._metrics_dashboard_status
89
-
90
- @metrics_dashboard_status.setter
91
- def metrics_dashboard_status(self, metrics_dashboard_status):
92
- """Sets the metrics_dashboard_status of this ExternalServiceStatusResponse.
93
-
94
-
95
- :param metrics_dashboard_status: The metrics_dashboard_status of this ExternalServiceStatusResponse. # noqa: E501
96
- :type: ExternalServiceStatus
97
- """
98
-
99
- self._metrics_dashboard_status = metrics_dashboard_status
100
-
101
- @property
102
- def persistent_metrics_status(self):
103
- """Gets the persistent_metrics_status of this ExternalServiceStatusResponse. # noqa: E501
104
-
105
-
106
- :return: The persistent_metrics_status of this ExternalServiceStatusResponse. # noqa: E501
107
- :rtype: ExternalServiceStatus
108
- """
109
- return self._persistent_metrics_status
110
-
111
- @persistent_metrics_status.setter
112
- def persistent_metrics_status(self, persistent_metrics_status):
113
- """Sets the persistent_metrics_status of this ExternalServiceStatusResponse.
114
-
115
-
116
- :param persistent_metrics_status: The persistent_metrics_status of this ExternalServiceStatusResponse. # noqa: E501
117
- :type: ExternalServiceStatus
118
- """
119
-
120
- self._persistent_metrics_status = persistent_metrics_status
121
-
122
- @property
123
- def jupyter_noteboook_status(self):
124
- """Gets the jupyter_noteboook_status of this ExternalServiceStatusResponse. # noqa: E501
125
-
126
-
127
- :return: The jupyter_noteboook_status of this ExternalServiceStatusResponse. # noqa: E501
128
- :rtype: ExternalServiceStatus
129
- """
130
- return self._jupyter_noteboook_status
131
-
132
- @jupyter_noteboook_status.setter
133
- def jupyter_noteboook_status(self, jupyter_noteboook_status):
134
- """Sets the jupyter_noteboook_status of this ExternalServiceStatusResponse.
135
-
136
-
137
- :param jupyter_noteboook_status: The jupyter_noteboook_status of this ExternalServiceStatusResponse. # noqa: E501
138
- :type: ExternalServiceStatus
139
- """
140
-
141
- self._jupyter_noteboook_status = jupyter_noteboook_status
142
-
143
- @property
144
- def service_proxy_status(self):
145
- """Gets the service_proxy_status of this ExternalServiceStatusResponse. # noqa: E501
146
-
147
-
148
- :return: The service_proxy_status of this ExternalServiceStatusResponse. # noqa: E501
149
- :rtype: ExternalServiceStatus
150
- """
151
- return self._service_proxy_status
152
-
153
- @service_proxy_status.setter
154
- def service_proxy_status(self, service_proxy_status):
155
- """Sets the service_proxy_status of this ExternalServiceStatusResponse.
156
-
157
-
158
- :param service_proxy_status: The service_proxy_status of this ExternalServiceStatusResponse. # noqa: E501
159
- :type: ExternalServiceStatus
160
- """
161
-
162
- self._service_proxy_status = service_proxy_status
163
-
164
- @property
165
- def ray_dashboard_status(self):
166
- """Gets the ray_dashboard_status of this ExternalServiceStatusResponse. # noqa: E501
167
-
168
-
169
- :return: The ray_dashboard_status of this ExternalServiceStatusResponse. # noqa: E501
170
- :rtype: ExternalServiceStatus
171
- """
172
- return self._ray_dashboard_status
173
-
174
- @ray_dashboard_status.setter
175
- def ray_dashboard_status(self, ray_dashboard_status):
176
- """Sets the ray_dashboard_status of this ExternalServiceStatusResponse.
177
-
178
-
179
- :param ray_dashboard_status: The ray_dashboard_status of this ExternalServiceStatusResponse. # noqa: E501
180
- :type: ExternalServiceStatus
181
- """
182
-
183
- self._ray_dashboard_status = ray_dashboard_status
184
-
185
- @property
186
- def webterminal_status(self):
187
- """Gets the webterminal_status of this ExternalServiceStatusResponse. # noqa: E501
188
-
189
-
190
- :return: The webterminal_status of this ExternalServiceStatusResponse. # noqa: E501
191
- :rtype: ExternalServiceStatus
192
- """
193
- return self._webterminal_status
194
-
195
- @webterminal_status.setter
196
- def webterminal_status(self, webterminal_status):
197
- """Sets the webterminal_status of this ExternalServiceStatusResponse.
198
-
199
-
200
- :param webterminal_status: The webterminal_status of this ExternalServiceStatusResponse. # noqa: E501
201
- :type: ExternalServiceStatus
202
- """
203
-
204
- self._webterminal_status = webterminal_status
205
-
206
- def to_dict(self):
207
- """Returns the model properties as a dict"""
208
- result = {}
209
-
210
- for attr, _ in six.iteritems(self.openapi_types):
211
- value = getattr(self, attr)
212
- if isinstance(value, list):
213
- result[attr] = list(map(
214
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
215
- value
216
- ))
217
- elif hasattr(value, "to_dict"):
218
- result[attr] = value.to_dict()
219
- elif isinstance(value, dict):
220
- result[attr] = dict(map(
221
- lambda item: (item[0], item[1].to_dict())
222
- if hasattr(item[1], "to_dict") else item,
223
- value.items()
224
- ))
225
- else:
226
- result[attr] = value
227
-
228
- return result
229
-
230
- def to_str(self):
231
- """Returns the string representation of the model"""
232
- return pprint.pformat(self.to_dict())
233
-
234
- def __repr__(self):
235
- """For `print` and `pprint`"""
236
- return self.to_str()
237
-
238
- def __eq__(self, other):
239
- """Returns true if both objects are equal"""
240
- if not isinstance(other, ExternalServiceStatusResponse):
241
- return False
242
-
243
- return self.to_dict() == other.to_dict()
244
-
245
- def __ne__(self, other):
246
- """Returns true if both objects are not equal"""
247
- if not isinstance(other, ExternalServiceStatusResponse):
248
- return True
249
-
250
- return self.to_dict() != other.to_dict()
@@ -1,121 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Managed Ray API
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
15
-
16
- import six
17
-
18
- from openapi_client.configuration import Configuration
19
-
20
-
21
- class ExternalservicestatusresponseResponse(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
27
-
28
- """
29
- Attributes:
30
- openapi_types (dict): The key is attribute name
31
- and the value is attribute type.
32
- attribute_map (dict): The key is attribute name
33
- and the value is json key in definition.
34
- """
35
- openapi_types = {
36
- 'result': 'ExternalServiceStatusResponse'
37
- }
38
-
39
- attribute_map = {
40
- 'result': 'result'
41
- }
42
-
43
- def __init__(self, result=None, local_vars_configuration=None): # noqa: E501
44
- """ExternalservicestatusresponseResponse - a model defined in OpenAPI""" # noqa: E501
45
- if local_vars_configuration is None:
46
- local_vars_configuration = Configuration()
47
- self.local_vars_configuration = local_vars_configuration
48
-
49
- self._result = None
50
- self.discriminator = None
51
-
52
- self.result = result
53
-
54
- @property
55
- def result(self):
56
- """Gets the result of this ExternalservicestatusresponseResponse. # noqa: E501
57
-
58
-
59
- :return: The result of this ExternalservicestatusresponseResponse. # noqa: E501
60
- :rtype: ExternalServiceStatusResponse
61
- """
62
- return self._result
63
-
64
- @result.setter
65
- def result(self, result):
66
- """Sets the result of this ExternalservicestatusresponseResponse.
67
-
68
-
69
- :param result: The result of this ExternalservicestatusresponseResponse. # noqa: E501
70
- :type: ExternalServiceStatusResponse
71
- """
72
- if self.local_vars_configuration.client_side_validation and result is None: # noqa: E501
73
- raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501
74
-
75
- self._result = result
76
-
77
- def to_dict(self):
78
- """Returns the model properties as a dict"""
79
- result = {}
80
-
81
- for attr, _ in six.iteritems(self.openapi_types):
82
- value = getattr(self, attr)
83
- if isinstance(value, list):
84
- result[attr] = list(map(
85
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
86
- value
87
- ))
88
- elif hasattr(value, "to_dict"):
89
- result[attr] = value.to_dict()
90
- elif isinstance(value, dict):
91
- result[attr] = dict(map(
92
- lambda item: (item[0], item[1].to_dict())
93
- if hasattr(item[1], "to_dict") else item,
94
- value.items()
95
- ))
96
- else:
97
- result[attr] = value
98
-
99
- return result
100
-
101
- def to_str(self):
102
- """Returns the string representation of the model"""
103
- return pprint.pformat(self.to_dict())
104
-
105
- def __repr__(self):
106
- """For `print` and `pprint`"""
107
- return self.to_str()
108
-
109
- def __eq__(self, other):
110
- """Returns true if both objects are equal"""
111
- if not isinstance(other, ExternalservicestatusresponseResponse):
112
- return False
113
-
114
- return self.to_dict() == other.to_dict()
115
-
116
- def __ne__(self, other):
117
- """Returns true if both objects are not equal"""
118
- if not isinstance(other, ExternalservicestatusresponseResponse):
119
- return True
120
-
121
- return self.to_dict() != other.to_dict()
@@ -1,100 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Managed Ray API
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
15
-
16
- import six
17
-
18
- from openapi_client.configuration import Configuration
19
-
20
-
21
- class MonitorLogsExtension(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
27
-
28
- """
29
- allowed enum values
30
- """
31
- LOG = "log"
32
- OUT = "out"
33
-
34
- allowable_values = [LOG, OUT] # noqa: E501
35
-
36
- """
37
- Attributes:
38
- openapi_types (dict): The key is attribute name
39
- and the value is attribute type.
40
- attribute_map (dict): The key is attribute name
41
- and the value is json key in definition.
42
- """
43
- openapi_types = {
44
- }
45
-
46
- attribute_map = {
47
- }
48
-
49
- def __init__(self, local_vars_configuration=None): # noqa: E501
50
- """MonitorLogsExtension - a model defined in OpenAPI""" # noqa: E501
51
- if local_vars_configuration is None:
52
- local_vars_configuration = Configuration()
53
- self.local_vars_configuration = local_vars_configuration
54
- self.discriminator = None
55
-
56
- def to_dict(self):
57
- """Returns the model properties as a dict"""
58
- result = {}
59
-
60
- for attr, _ in six.iteritems(self.openapi_types):
61
- value = getattr(self, attr)
62
- if isinstance(value, list):
63
- result[attr] = list(map(
64
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
65
- value
66
- ))
67
- elif hasattr(value, "to_dict"):
68
- result[attr] = value.to_dict()
69
- elif isinstance(value, dict):
70
- result[attr] = dict(map(
71
- lambda item: (item[0], item[1].to_dict())
72
- if hasattr(item[1], "to_dict") else item,
73
- value.items()
74
- ))
75
- else:
76
- result[attr] = value
77
-
78
- return result
79
-
80
- def to_str(self):
81
- """Returns the string representation of the model"""
82
- return pprint.pformat(self.to_dict())
83
-
84
- def __repr__(self):
85
- """For `print` and `pprint`"""
86
- return self.to_str()
87
-
88
- def __eq__(self, other):
89
- """Returns true if both objects are equal"""
90
- if not isinstance(other, MonitorLogsExtension):
91
- return False
92
-
93
- return self.to_dict() == other.to_dict()
94
-
95
- def __ne__(self, other):
96
- """Returns true if both objects are not equal"""
97
- if not isinstance(other, MonitorLogsExtension):
98
- return True
99
-
100
- return self.to_dict() != other.to_dict()
@@ -1,175 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Managed Ray API
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
15
-
16
- import six
17
-
18
- from openapi_client.configuration import Configuration
19
-
20
-
21
- class SessionDescribe(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
27
-
28
- """
29
- Attributes:
30
- openapi_types (dict): The key is attribute name
31
- and the value is attribute type.
32
- attribute_map (dict): The key is attribute name
33
- and the value is json key in definition.
34
- """
35
- openapi_types = {
36
- 'id': 'str',
37
- 'applied_snapshots': 'list[AppliedSnapshot]',
38
- 'commands': 'list[SessionCommand]'
39
- }
40
-
41
- attribute_map = {
42
- 'id': 'id',
43
- 'applied_snapshots': 'applied_snapshots',
44
- 'commands': 'commands'
45
- }
46
-
47
- def __init__(self, id=None, applied_snapshots=None, commands=None, local_vars_configuration=None): # noqa: E501
48
- """SessionDescribe - a model defined in OpenAPI""" # noqa: E501
49
- if local_vars_configuration is None:
50
- local_vars_configuration = Configuration()
51
- self.local_vars_configuration = local_vars_configuration
52
-
53
- self._id = None
54
- self._applied_snapshots = None
55
- self._commands = None
56
- self.discriminator = None
57
-
58
- self.id = id
59
- self.applied_snapshots = applied_snapshots
60
- self.commands = commands
61
-
62
- @property
63
- def id(self):
64
- """Gets the id of this SessionDescribe. # noqa: E501
65
-
66
-
67
- :return: The id of this SessionDescribe. # noqa: E501
68
- :rtype: str
69
- """
70
- return self._id
71
-
72
- @id.setter
73
- def id(self, id):
74
- """Sets the id of this SessionDescribe.
75
-
76
-
77
- :param id: The id of this SessionDescribe. # noqa: E501
78
- :type: str
79
- """
80
- if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
81
- raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
82
-
83
- self._id = id
84
-
85
- @property
86
- def applied_snapshots(self):
87
- """Gets the applied_snapshots of this SessionDescribe. # noqa: E501
88
-
89
-
90
- :return: The applied_snapshots of this SessionDescribe. # noqa: E501
91
- :rtype: list[AppliedSnapshot]
92
- """
93
- return self._applied_snapshots
94
-
95
- @applied_snapshots.setter
96
- def applied_snapshots(self, applied_snapshots):
97
- """Sets the applied_snapshots of this SessionDescribe.
98
-
99
-
100
- :param applied_snapshots: The applied_snapshots of this SessionDescribe. # noqa: E501
101
- :type: list[AppliedSnapshot]
102
- """
103
- if self.local_vars_configuration.client_side_validation and applied_snapshots is None: # noqa: E501
104
- raise ValueError("Invalid value for `applied_snapshots`, must not be `None`") # noqa: E501
105
-
106
- self._applied_snapshots = applied_snapshots
107
-
108
- @property
109
- def commands(self):
110
- """Gets the commands of this SessionDescribe. # noqa: E501
111
-
112
-
113
- :return: The commands of this SessionDescribe. # noqa: E501
114
- :rtype: list[SessionCommand]
115
- """
116
- return self._commands
117
-
118
- @commands.setter
119
- def commands(self, commands):
120
- """Sets the commands of this SessionDescribe.
121
-
122
-
123
- :param commands: The commands of this SessionDescribe. # noqa: E501
124
- :type: list[SessionCommand]
125
- """
126
- if self.local_vars_configuration.client_side_validation and commands is None: # noqa: E501
127
- raise ValueError("Invalid value for `commands`, must not be `None`") # noqa: E501
128
-
129
- self._commands = commands
130
-
131
- def to_dict(self):
132
- """Returns the model properties as a dict"""
133
- result = {}
134
-
135
- for attr, _ in six.iteritems(self.openapi_types):
136
- value = getattr(self, attr)
137
- if isinstance(value, list):
138
- result[attr] = list(map(
139
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
140
- value
141
- ))
142
- elif hasattr(value, "to_dict"):
143
- result[attr] = value.to_dict()
144
- elif isinstance(value, dict):
145
- result[attr] = dict(map(
146
- lambda item: (item[0], item[1].to_dict())
147
- if hasattr(item[1], "to_dict") else item,
148
- value.items()
149
- ))
150
- else:
151
- result[attr] = value
152
-
153
- return result
154
-
155
- def to_str(self):
156
- """Returns the string representation of the model"""
157
- return pprint.pformat(self.to_dict())
158
-
159
- def __repr__(self):
160
- """For `print` and `pprint`"""
161
- return self.to_str()
162
-
163
- def __eq__(self, other):
164
- """Returns true if both objects are equal"""
165
- if not isinstance(other, SessionDescribe):
166
- return False
167
-
168
- return self.to_dict() == other.to_dict()
169
-
170
- def __ne__(self, other):
171
- """Returns true if both objects are not equal"""
172
- if not isinstance(other, SessionDescribe):
173
- return True
174
-
175
- return self.to_dict() != other.to_dict()