terra-scientific-pipelines-service-api-client 0.0.0__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.

Potentially problematic release.


This version of terra-scientific-pipelines-service-api-client might be problematic. Click here for more details.

Files changed (39) hide show
  1. teaspoons_client/__init__.py +58 -0
  2. teaspoons_client/api/__init__.py +9 -0
  3. teaspoons_client/api/admin_api.py +599 -0
  4. teaspoons_client/api/jobs_api.py +588 -0
  5. teaspoons_client/api/pipeline_runs_api.py +1203 -0
  6. teaspoons_client/api/pipelines_api.py +547 -0
  7. teaspoons_client/api/public_api.py +528 -0
  8. teaspoons_client/api_client.py +788 -0
  9. teaspoons_client/api_response.py +21 -0
  10. teaspoons_client/configuration.py +465 -0
  11. teaspoons_client/exceptions.py +199 -0
  12. teaspoons_client/models/__init__.py +37 -0
  13. teaspoons_client/models/admin_pipeline.py +101 -0
  14. teaspoons_client/models/async_pipeline_run_response.py +103 -0
  15. teaspoons_client/models/error_report.py +91 -0
  16. teaspoons_client/models/get_jobs_response.py +99 -0
  17. teaspoons_client/models/get_pipeline_runs_response.py +97 -0
  18. teaspoons_client/models/get_pipelines_result.py +95 -0
  19. teaspoons_client/models/job_control.py +87 -0
  20. teaspoons_client/models/job_report.py +106 -0
  21. teaspoons_client/models/job_result.py +97 -0
  22. teaspoons_client/models/pipeline.py +91 -0
  23. teaspoons_client/models/pipeline_run.py +91 -0
  24. teaspoons_client/models/pipeline_run_report.py +93 -0
  25. teaspoons_client/models/pipeline_user_provided_input_definition.py +91 -0
  26. teaspoons_client/models/pipeline_with_details.py +103 -0
  27. teaspoons_client/models/prepare_pipeline_run_request_body.py +91 -0
  28. teaspoons_client/models/prepare_pipeline_run_response.py +89 -0
  29. teaspoons_client/models/start_pipeline_run_request_body.py +93 -0
  30. teaspoons_client/models/system_status.py +102 -0
  31. teaspoons_client/models/system_status_systems_value.py +89 -0
  32. teaspoons_client/models/update_pipeline_request_body.py +91 -0
  33. teaspoons_client/models/version_properties.py +93 -0
  34. teaspoons_client/py.typed +0 -0
  35. teaspoons_client/rest.py +257 -0
  36. terra_scientific_pipelines_service_api_client-0.0.0.dist-info/METADATA +16 -0
  37. terra_scientific_pipelines_service_api_client-0.0.0.dist-info/RECORD +39 -0
  38. terra_scientific_pipelines_service_api_client-0.0.0.dist-info/WHEEL +5 -0
  39. terra_scientific_pipelines_service_api_client-0.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Terra Scientific Pipelines Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class VersionProperties(BaseModel):
26
+ """
27
+ VersionProperties
28
+ """ # noqa: E501
29
+ git_tag: Optional[StrictStr] = Field(default=None, alias="gitTag")
30
+ git_hash: Optional[StrictStr] = Field(default=None, alias="gitHash")
31
+ github: Optional[StrictStr] = None
32
+ build: Optional[StrictStr] = None
33
+ __properties: ClassVar[List[str]] = ["gitTag", "gitHash", "github", "build"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of VersionProperties from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of VersionProperties from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "gitTag": obj.get("gitTag"),
87
+ "gitHash": obj.get("gitHash"),
88
+ "github": obj.get("github"),
89
+ "build": obj.get("build")
90
+ })
91
+ return _obj
92
+
93
+
File without changes
@@ -0,0 +1,257 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Terra Scientific Pipelines Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import io
16
+ import json
17
+ import re
18
+ import ssl
19
+
20
+ import urllib3
21
+
22
+ from teaspoons_client.exceptions import ApiException, ApiValueError
23
+
24
+ SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"}
25
+ RESTResponseType = urllib3.HTTPResponse
26
+
27
+
28
+ def is_socks_proxy_url(url):
29
+ if url is None:
30
+ return False
31
+ split_section = url.split("://")
32
+ if len(split_section) < 2:
33
+ return False
34
+ else:
35
+ return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES
36
+
37
+
38
+ class RESTResponse(io.IOBase):
39
+
40
+ def __init__(self, resp) -> None:
41
+ self.response = resp
42
+ self.status = resp.status
43
+ self.reason = resp.reason
44
+ self.data = None
45
+
46
+ def read(self):
47
+ if self.data is None:
48
+ self.data = self.response.data
49
+ return self.data
50
+
51
+ def getheaders(self):
52
+ """Returns a dictionary of the response headers."""
53
+ return self.response.headers
54
+
55
+ def getheader(self, name, default=None):
56
+ """Returns a given response header."""
57
+ return self.response.headers.get(name, default)
58
+
59
+
60
+ class RESTClientObject:
61
+
62
+ def __init__(self, configuration) -> None:
63
+ # urllib3.PoolManager will pass all kw parameters to connectionpool
64
+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
65
+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
66
+ # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
67
+
68
+ # cert_reqs
69
+ if configuration.verify_ssl:
70
+ cert_reqs = ssl.CERT_REQUIRED
71
+ else:
72
+ cert_reqs = ssl.CERT_NONE
73
+
74
+ pool_args = {
75
+ "cert_reqs": cert_reqs,
76
+ "ca_certs": configuration.ssl_ca_cert,
77
+ "cert_file": configuration.cert_file,
78
+ "key_file": configuration.key_file,
79
+ }
80
+ if configuration.assert_hostname is not None:
81
+ pool_args['assert_hostname'] = (
82
+ configuration.assert_hostname
83
+ )
84
+
85
+ if configuration.retries is not None:
86
+ pool_args['retries'] = configuration.retries
87
+
88
+ if configuration.tls_server_name:
89
+ pool_args['server_hostname'] = configuration.tls_server_name
90
+
91
+
92
+ if configuration.socket_options is not None:
93
+ pool_args['socket_options'] = configuration.socket_options
94
+
95
+ if configuration.connection_pool_maxsize is not None:
96
+ pool_args['maxsize'] = configuration.connection_pool_maxsize
97
+
98
+ # https pool manager
99
+ self.pool_manager: urllib3.PoolManager
100
+
101
+ if configuration.proxy:
102
+ if is_socks_proxy_url(configuration.proxy):
103
+ from urllib3.contrib.socks import SOCKSProxyManager
104
+ pool_args["proxy_url"] = configuration.proxy
105
+ pool_args["headers"] = configuration.proxy_headers
106
+ self.pool_manager = SOCKSProxyManager(**pool_args)
107
+ else:
108
+ pool_args["proxy_url"] = configuration.proxy
109
+ pool_args["proxy_headers"] = configuration.proxy_headers
110
+ self.pool_manager = urllib3.ProxyManager(**pool_args)
111
+ else:
112
+ self.pool_manager = urllib3.PoolManager(**pool_args)
113
+
114
+ def request(
115
+ self,
116
+ method,
117
+ url,
118
+ headers=None,
119
+ body=None,
120
+ post_params=None,
121
+ _request_timeout=None
122
+ ):
123
+ """Perform requests.
124
+
125
+ :param method: http request method
126
+ :param url: http request url
127
+ :param headers: http request headers
128
+ :param body: request json body, for `application/json`
129
+ :param post_params: request post parameters,
130
+ `application/x-www-form-urlencoded`
131
+ and `multipart/form-data`
132
+ :param _request_timeout: timeout setting for this request. If one
133
+ number provided, it will be total request
134
+ timeout. It can also be a pair (tuple) of
135
+ (connection, read) timeouts.
136
+ """
137
+ method = method.upper()
138
+ assert method in [
139
+ 'GET',
140
+ 'HEAD',
141
+ 'DELETE',
142
+ 'POST',
143
+ 'PUT',
144
+ 'PATCH',
145
+ 'OPTIONS'
146
+ ]
147
+
148
+ if post_params and body:
149
+ raise ApiValueError(
150
+ "body parameter cannot be used with post_params parameter."
151
+ )
152
+
153
+ post_params = post_params or {}
154
+ headers = headers or {}
155
+
156
+ timeout = None
157
+ if _request_timeout:
158
+ if isinstance(_request_timeout, (int, float)):
159
+ timeout = urllib3.Timeout(total=_request_timeout)
160
+ elif (
161
+ isinstance(_request_timeout, tuple)
162
+ and len(_request_timeout) == 2
163
+ ):
164
+ timeout = urllib3.Timeout(
165
+ connect=_request_timeout[0],
166
+ read=_request_timeout[1]
167
+ )
168
+
169
+ try:
170
+ # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
171
+ if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
172
+
173
+ # no content type provided or payload is json
174
+ content_type = headers.get('Content-Type')
175
+ if (
176
+ not content_type
177
+ or re.search('json', content_type, re.IGNORECASE)
178
+ ):
179
+ request_body = None
180
+ if body is not None:
181
+ request_body = json.dumps(body)
182
+ r = self.pool_manager.request(
183
+ method,
184
+ url,
185
+ body=request_body,
186
+ timeout=timeout,
187
+ headers=headers,
188
+ preload_content=False
189
+ )
190
+ elif content_type == 'application/x-www-form-urlencoded':
191
+ r = self.pool_manager.request(
192
+ method,
193
+ url,
194
+ fields=post_params,
195
+ encode_multipart=False,
196
+ timeout=timeout,
197
+ headers=headers,
198
+ preload_content=False
199
+ )
200
+ elif content_type == 'multipart/form-data':
201
+ # must del headers['Content-Type'], or the correct
202
+ # Content-Type which generated by urllib3 will be
203
+ # overwritten.
204
+ del headers['Content-Type']
205
+ # Ensures that dict objects are serialized
206
+ post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params]
207
+ r = self.pool_manager.request(
208
+ method,
209
+ url,
210
+ fields=post_params,
211
+ encode_multipart=True,
212
+ timeout=timeout,
213
+ headers=headers,
214
+ preload_content=False
215
+ )
216
+ # Pass a `string` parameter directly in the body to support
217
+ # other content types than JSON when `body` argument is
218
+ # provided in serialized form.
219
+ elif isinstance(body, str) or isinstance(body, bytes):
220
+ r = self.pool_manager.request(
221
+ method,
222
+ url,
223
+ body=body,
224
+ timeout=timeout,
225
+ headers=headers,
226
+ preload_content=False
227
+ )
228
+ elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool):
229
+ request_body = "true" if body else "false"
230
+ r = self.pool_manager.request(
231
+ method,
232
+ url,
233
+ body=request_body,
234
+ preload_content=False,
235
+ timeout=timeout,
236
+ headers=headers)
237
+ else:
238
+ # Cannot generate the request from given parameters
239
+ msg = """Cannot prepare a request message for provided
240
+ arguments. Please check that your arguments match
241
+ declared content type."""
242
+ raise ApiException(status=0, reason=msg)
243
+ # For `GET`, `HEAD`
244
+ else:
245
+ r = self.pool_manager.request(
246
+ method,
247
+ url,
248
+ fields={},
249
+ timeout=timeout,
250
+ headers=headers,
251
+ preload_content=False
252
+ )
253
+ except urllib3.exceptions.SSLError as e:
254
+ msg = "\n".join([type(e).__name__, str(e)])
255
+ raise ApiException(status=0, reason=msg)
256
+
257
+ return RESTResponse(r)
@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.1
2
+ Name: terra-scientific-pipelines-service-api-client
3
+ Version: 0.0.0
4
+ Summary: Terra Scientific Pipelines Service
5
+ Home-page:
6
+ Author: OpenAPI Generator community
7
+ Author-email: team@openapitools.org
8
+ Keywords: OpenAPI,OpenAPI-Generator,Terra Scientific Pipelines Service
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: urllib3 <2.1.0,>=1.25.3
11
+ Requires-Dist: python-dateutil
12
+ Requires-Dist: pydantic >=2
13
+ Requires-Dist: typing-extensions >=4.7.1
14
+
15
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
16
+
@@ -0,0 +1,39 @@
1
+ teaspoons_client/__init__.py,sha256=gCZrrIZvUsyyfYDEmBou2iE5sqhTJcq2qg4ZTtncW4s,2845
2
+ teaspoons_client/api_client.py,sha256=lhuA1I4wxEdla5R7sB3r5B3uvJ0uVKRYcddAc_fYNPw,27140
3
+ teaspoons_client/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
4
+ teaspoons_client/configuration.py,sha256=ekVSFaRtkEsuiGn4YcEKUbVoQRYPGsfnBrHm7M9jTRI,15584
5
+ teaspoons_client/exceptions.py,sha256=54himL4zduna12UfdUqGb8LEVunPChzEvjvPw0DjWjk,5999
6
+ teaspoons_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ teaspoons_client/rest.py,sha256=O3H88vAcBae6qCsa8-UyGIA5Rt3SQCutWqjes7w1G8c,9437
8
+ teaspoons_client/api/__init__.py,sha256=HtNBJMapZXvdi3mVrWN6NS_O2zyfTAdG9JT6PPXgsuo,331
9
+ teaspoons_client/api/admin_api.py,sha256=STXxuHdS-fADxP3Gm93YRISJXIiK0V07mm5kErqn6GY,23783
10
+ teaspoons_client/api/jobs_api.py,sha256=Jf8ZBo4aHNaC7Jkhol3_rmlvihpbsy3z7HjFKIy2kjo,22852
11
+ teaspoons_client/api/pipeline_runs_api.py,sha256=tEcAqHIu9AbSyXvdt94mVSMroPCqtUpLiWyEik3QyEk,49347
12
+ teaspoons_client/api/pipelines_api.py,sha256=TRCQ55lysT74CoWIf_-VkQL6HS4gNHhhvEuzelv_4zE,21050
13
+ teaspoons_client/api/public_api.py,sha256=uuo_gx1xbhUZez_gKAD2Js-SrtGyD9NcDWKzPCznoYk,19601
14
+ teaspoons_client/models/__init__.py,sha256=InrLWQbY3PM14TWE9wtAqHpyV_uCRkq8zFtqNZuMjEk,2000
15
+ teaspoons_client/models/admin_pipeline.py,sha256=3Ci4-PVXjqO3bgRLrTdRsfEVEsXSS5XDtARQdMOGJnI,4349
16
+ teaspoons_client/models/async_pipeline_run_response.py,sha256=c_Nj3tC41y2G0pqvVwzKn_bVE6mgA2h_Aisp6315zSE,3899
17
+ teaspoons_client/models/error_report.py,sha256=3IsEF07EPxdcMSPCMW4yE1pXydE8EHmlIBYVScvXyXs,2714
18
+ teaspoons_client/models/get_jobs_response.py,sha256=Vdz0yG4q4TjbkLuyI13xaabR6Qn_nF3LNxn04qjRPl8,3388
19
+ teaspoons_client/models/get_pipeline_runs_response.py,sha256=xX4XMQZazwYRrFtx-PWo54JtfCYG1UhbDU9D9wyQ9Vc,3252
20
+ teaspoons_client/models/get_pipelines_result.py,sha256=U2UFW1tSbiShA5j9a_1Gk4SjU2eYpSIP8NGd6xdixxk,3091
21
+ teaspoons_client/models/job_control.py,sha256=PkTmAKmm6JXxu7EUfa02UNdBaxoZvo0v0TRsHVdRTM0,2551
22
+ teaspoons_client/models/job_report.py,sha256=q5ijrPgVmGqXjrTZKzEyOswUlWKsMD6v-oTFDUUdMRg,3974
23
+ teaspoons_client/models/job_result.py,sha256=WWZRoqmTuh5ZP9ugMENGZUx5zrzADHx9O0m2Bhh--yg,3337
24
+ teaspoons_client/models/pipeline.py,sha256=x0NNa8ub4Px6azC4axVvRncyP7wJ-D23EBI6uY2M0lI,3006
25
+ teaspoons_client/models/pipeline_run.py,sha256=RWy1WrSyr6vBjgCd8papyqM5d8pJZ86VAcmvqHPYphY,3023
26
+ teaspoons_client/models/pipeline_run_report.py,sha256=_mATV35UdFWFb01oBucnGOna4sz1CL5m97p29yFc8bg,3415
27
+ teaspoons_client/models/pipeline_user_provided_input_definition.py,sha256=jEC7yUCrcMKtu01EAdRhIRBmrdCjBbhPeOef7loyick,3056
28
+ teaspoons_client/models/pipeline_with_details.py,sha256=c489n3m6bswOGKGnVLupcB-KCAVgQdihUnNKov9LSmA,3929
29
+ teaspoons_client/models/prepare_pipeline_run_request_body.py,sha256=FjmX-_xvM_mJGw2l-qKczQVX81g16X2dhsLSqDTS1zQ,3158
30
+ teaspoons_client/models/prepare_pipeline_run_response.py,sha256=5Y-NTPjxR13brTHbCWU-1YBXERUWRsg7ShNRK1bcyJM,2948
31
+ teaspoons_client/models/start_pipeline_run_request_body.py,sha256=Et4zcC9UVnINscI4OVtmHlhe1MvPgMq0819sNqyLLOw,3167
32
+ teaspoons_client/models/system_status.py,sha256=615Ol6vBFowfewWesLeQe6aljaKMXIZb1rgWxt5FNsg,3305
33
+ teaspoons_client/models/system_status_systems_value.py,sha256=lKuq0aDpRne858ta4gvSZL7JMqc7V3TJcVUmj9-OgOo,2675
34
+ teaspoons_client/models/update_pipeline_request_body.py,sha256=OYjf_6SVBg00GjGzq9aftbeLJkUHikm80sqFQQSWvUQ,3257
35
+ teaspoons_client/models/version_properties.py,sha256=pnx1pduz4vnw-wx_sdASU_-zRqE1wf3JdNm4OLDJ2i8,2888
36
+ terra_scientific_pipelines_service_api_client-0.0.0.dist-info/METADATA,sha256=XinJaEsDC2Be17o6xncccFdR3J9zqJJExgG0jAXUGkU,584
37
+ terra_scientific_pipelines_service_api_client-0.0.0.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
38
+ terra_scientific_pipelines_service_api_client-0.0.0.dist-info/top_level.txt,sha256=DZYs7jBZ-_bWvnXrtK1TbtfhltgkuPWTRo1Ei7Uv9Jc,17
39
+ terra_scientific_pipelines_service_api_client-0.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (75.3.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+