wds-client 0.17.0__py3-none-any.whl → 0.18.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.
- wds_client/__init__.py +1 -1
- wds_client/api_client.py +8 -1
- wds_client/configuration.py +1 -1
- wds_client/models/generic_job.py +2 -2
- wds_client/models/job_v1.py +2 -2
- wds_client/models/record_query_response.py +3 -3
- wds_client/models/record_type_schema.py +3 -3
- {wds_client-0.17.0.dist-info → wds_client-0.18.0.dist-info}/METADATA +1 -1
- {wds_client-0.17.0.dist-info → wds_client-0.18.0.dist-info}/RECORD +11 -11
- {wds_client-0.17.0.dist-info → wds_client-0.18.0.dist-info}/WHEEL +1 -1
- {wds_client-0.17.0.dist-info → wds_client-0.18.0.dist-info}/top_level.txt +0 -0
wds_client/__init__.py
CHANGED
wds_client/api_client.py
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
import datetime
|
16
16
|
from dateutil.parser import parse
|
17
17
|
from enum import Enum
|
18
|
+
import decimal
|
18
19
|
import json
|
19
20
|
import mimetypes
|
20
21
|
import os
|
@@ -66,6 +67,7 @@ class ApiClient:
|
|
66
67
|
'bool': bool,
|
67
68
|
'date': datetime.date,
|
68
69
|
'datetime': datetime.datetime,
|
70
|
+
'decimal': decimal.Decimal,
|
69
71
|
'object': object,
|
70
72
|
}
|
71
73
|
_pool = None
|
@@ -88,7 +90,7 @@ class ApiClient:
|
|
88
90
|
self.default_headers[header_name] = header_value
|
89
91
|
self.cookie = cookie
|
90
92
|
# Set default User-Agent.
|
91
|
-
self.user_agent = 'wds-client/0.
|
93
|
+
self.user_agent = 'wds-client/0.18.0/python'
|
92
94
|
self.client_side_validation = configuration.client_side_validation
|
93
95
|
|
94
96
|
def __enter__(self):
|
@@ -338,6 +340,7 @@ class ApiClient:
|
|
338
340
|
If obj is str, int, long, float, bool, return directly.
|
339
341
|
If obj is datetime.datetime, datetime.date
|
340
342
|
convert to string in iso8601 format.
|
343
|
+
If obj is decimal.Decimal return string representation.
|
341
344
|
If obj is list, sanitize each element in the list.
|
342
345
|
If obj is dict, return the dict.
|
343
346
|
If obj is OpenAPI model, return the properties dict.
|
@@ -363,6 +366,8 @@ class ApiClient:
|
|
363
366
|
)
|
364
367
|
elif isinstance(obj, (datetime.datetime, datetime.date)):
|
365
368
|
return obj.isoformat()
|
369
|
+
elif isinstance(obj, decimal.Decimal):
|
370
|
+
return str(obj)
|
366
371
|
|
367
372
|
elif isinstance(obj, dict):
|
368
373
|
obj_dict = obj
|
@@ -454,6 +459,8 @@ class ApiClient:
|
|
454
459
|
return self.__deserialize_date(data)
|
455
460
|
elif klass == datetime.datetime:
|
456
461
|
return self.__deserialize_datetime(data)
|
462
|
+
elif klass == decimal.Decimal:
|
463
|
+
return decimal.Decimal(data)
|
457
464
|
elif issubclass(klass, Enum):
|
458
465
|
return self.__deserialize_enum(data, klass)
|
459
466
|
else:
|
wds_client/configuration.py
CHANGED
@@ -392,7 +392,7 @@ class Configuration:
|
|
392
392
|
"OS: {env}\n"\
|
393
393
|
"Python Version: {pyversion}\n"\
|
394
394
|
"Version of the API: v0.2\n"\
|
395
|
-
"SDK Package Version: 0.
|
395
|
+
"SDK Package Version: 0.18.0".\
|
396
396
|
format(env=sys.platform, pyversion=sys.version)
|
397
397
|
|
398
398
|
def get_host_settings(self):
|
wds_client/models/generic_job.py
CHANGED
@@ -41,8 +41,8 @@ class GenericJob(BaseModel):
|
|
41
41
|
@field_validator('job_type')
|
42
42
|
def job_type_validate_enum(cls, value):
|
43
43
|
"""Validates the enum"""
|
44
|
-
if value not in set(['DATA_IMPORT', 'UNKNOWN']):
|
45
|
-
raise ValueError("must be one of enum values ('DATA_IMPORT', 'UNKNOWN')")
|
44
|
+
if value not in set(['DATA_IMPORT', 'WORKSPACE_INIT', 'UNKNOWN']):
|
45
|
+
raise ValueError("must be one of enum values ('DATA_IMPORT', 'WORKSPACE_INIT', 'UNKNOWN')")
|
46
46
|
return value
|
47
47
|
|
48
48
|
@field_validator('status')
|
wds_client/models/job_v1.py
CHANGED
@@ -39,8 +39,8 @@ class JobV1(BaseModel):
|
|
39
39
|
@field_validator('job_type')
|
40
40
|
def job_type_validate_enum(cls, value):
|
41
41
|
"""Validates the enum"""
|
42
|
-
if value not in set(['DATA_IMPORT', 'UNKNOWN']):
|
43
|
-
raise ValueError("must be one of enum values ('DATA_IMPORT', 'UNKNOWN')")
|
42
|
+
if value not in set(['DATA_IMPORT', 'WORKSPACE_INIT', 'UNKNOWN']):
|
43
|
+
raise ValueError("must be one of enum values ('DATA_IMPORT', 'WORKSPACE_INIT', 'UNKNOWN')")
|
44
44
|
return value
|
45
45
|
|
46
46
|
@field_validator('status')
|
@@ -78,9 +78,9 @@ class RecordQueryResponse(BaseModel):
|
|
78
78
|
# override the default output from pydantic by calling `to_dict()` of each item in records (list)
|
79
79
|
_items = []
|
80
80
|
if self.records:
|
81
|
-
for
|
82
|
-
if
|
83
|
-
_items.append(
|
81
|
+
for _item_records in self.records:
|
82
|
+
if _item_records:
|
83
|
+
_items.append(_item_records.to_dict())
|
84
84
|
_dict['records'] = _items
|
85
85
|
return _dict
|
86
86
|
|
@@ -75,9 +75,9 @@ class RecordTypeSchema(BaseModel):
|
|
75
75
|
# override the default output from pydantic by calling `to_dict()` of each item in attributes (list)
|
76
76
|
_items = []
|
77
77
|
if self.attributes:
|
78
|
-
for
|
79
|
-
if
|
80
|
-
_items.append(
|
78
|
+
for _item_attributes in self.attributes:
|
79
|
+
if _item_attributes:
|
80
|
+
_items.append(_item_attributes.to_dict())
|
81
81
|
_dict['attributes'] = _items
|
82
82
|
return _dict
|
83
83
|
|
@@ -1,7 +1,7 @@
|
|
1
|
-
wds_client/__init__.py,sha256=
|
2
|
-
wds_client/api_client.py,sha256=
|
1
|
+
wds_client/__init__.py,sha256=T44qdH86ojkWjg6nnLWcb3yCTzvLiwb62mpYKflf7sM,3616
|
2
|
+
wds_client/api_client.py,sha256=w_3XeVIaKy3GOCD8RK7Ii6g7rXH3-vHrGjZEjLTGvSg,27193
|
3
3
|
wds_client/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
4
|
-
wds_client/configuration.py,sha256=
|
4
|
+
wds_client/configuration.py,sha256=8oYYpqIHNn2cos9PiIrt_HClHdKP-SmmTTpP3Kze63s,15455
|
5
5
|
wds_client/exceptions.py,sha256=674T2OrRc-tySXqf45i00iZdt3r6AS-RnWjBUgRxAvc,6122
|
6
6
|
wds_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
wds_client/rest.py,sha256=Gbp9F8A2qoMDg4xrkCjSAG0FDHXUxcNB8oyfzJXxw4U,9554
|
@@ -35,15 +35,15 @@ wds_client/models/collection.py,sha256=LxuptlecUwSBpieeyuIUCgKghO47i1R7xyv_-HHKo
|
|
35
35
|
wds_client/models/collection_request.py,sha256=eNm5jUvaTqz20jrN0qoNg8iXf84sNmEF1ZpyP608fPM,3205
|
36
36
|
wds_client/models/commit.py,sha256=yE9OxZ_1kGnbD3U80QTBi8HOELfxd21Eb3-RraPqbsc,2720
|
37
37
|
wds_client/models/error_response.py,sha256=U1Fl24jQhD2gEEREBSemaUp8PHKO7XHJ4pSLmgnVxz0,3115
|
38
|
-
wds_client/models/generic_job.py,sha256
|
38
|
+
wds_client/models/generic_job.py,sha256=-LW-WC1T_SSfpAZTdxoEKc3_Njn-Iab1Opmy7E2hwfU,4421
|
39
39
|
wds_client/models/git.py,sha256=ylt-GWcCKsfZmWfBHQIT7EO5mHhLqQnnf8hANgUZcl0,2962
|
40
40
|
wds_client/models/import_request.py,sha256=r8Tph4ZXFfXpI3n1nlbqs7azgrdEynwlQYrn4RvufWw,3309
|
41
41
|
wds_client/models/job.py,sha256=vaqbX9i6Oe0plmCAD9hBbpSCysvSxAqWkkOTuRwCTBo,3499
|
42
|
-
wds_client/models/job_v1.py,sha256=
|
43
|
-
wds_client/models/record_query_response.py,sha256=
|
42
|
+
wds_client/models/job_v1.py,sha256=2-M7pJrzvdNiCTIRxOW8GiY9WJfDL_QeitPNQzojRvE,3962
|
43
|
+
wds_client/models/record_query_response.py,sha256=mwIUazdWiw1uu9Kq0MeSe4wqJAgA-5mQFS8os0GpofI,3833
|
44
44
|
wds_client/models/record_request.py,sha256=c-jJuqOgogRM5HdR2HoafMnpIAdfCukysSBFCqnwCjM,2796
|
45
45
|
wds_client/models/record_response.py,sha256=ZniN8hDVM7QAEbhwbUnr5RXYpZJHqwFPxBlmlhorBDk,3001
|
46
|
-
wds_client/models/record_type_schema.py,sha256=
|
46
|
+
wds_client/models/record_type_schema.py,sha256=UMlHVrAwfrsEn0-9YjgVw9WfVB2mBOi1ntsGwECaspQ,3785
|
47
47
|
wds_client/models/search_filter.py,sha256=TWUJEqSOdgER6OV9IrNodSnn9JZ8Q7Spc0e1EYWm7M0,2860
|
48
48
|
wds_client/models/search_request.py,sha256=RLJq3S4vC4bg9dprEH0kT-h9m6PVblBkAzVHYw5XW-I,3801
|
49
49
|
wds_client/models/search_sort_direction.py,sha256=fnqUYvbgXHQ5mESZnxDvcUZ5wi6i770fkqu00jtCATM,932
|
@@ -52,7 +52,7 @@ wds_client/models/tsv_upload_response.py,sha256=yhj-3KEFzs-EYnaGZvsr6KgrK6wlYCZK
|
|
52
52
|
wds_client/models/version_response.py,sha256=pQ9eukrGQPdLBwvPKN_ucFlMKff25oGywruwIdL918o,3516
|
53
53
|
wds_client/models/workspace_init.py,sha256=XHtI3gddZY3_X0byd232m15cChbvln_jWBDZoE8_20w,2942
|
54
54
|
wds_client/models/workspace_init_clone.py,sha256=MTQuoSuJrYCQLbWGPA8VCcB3phs7101HcUj3Q27yVK0,2847
|
55
|
-
wds_client-0.
|
56
|
-
wds_client-0.
|
57
|
-
wds_client-0.
|
58
|
-
wds_client-0.
|
55
|
+
wds_client-0.18.0.dist-info/METADATA,sha256=caCbBHwQ97SNqFPXe9wV_8wyo7KT_PWXOtPEXHPLZdw,675
|
56
|
+
wds_client-0.18.0.dist-info/WHEEL,sha256=nCVcAvsfA9TDtwGwhYaRrlPhTLV9m-Ga6mdyDtuwK18,91
|
57
|
+
wds_client-0.18.0.dist-info/top_level.txt,sha256=hU2h533r5-3FzApV8ps3zXmQJKy74SPT3sYR8-uZhp8,11
|
58
|
+
wds_client-0.18.0.dist-info/RECORD,,
|
File without changes
|