label-studio-sdk 1.0.2__py3-none-any.whl → 1.0.4__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 label-studio-sdk might be problematic. Click here for more details.

Files changed (67) hide show
  1. label_studio_sdk/__init__.py +20 -1
  2. label_studio_sdk/actions/client.py +8 -8
  3. label_studio_sdk/annotations/client.py +24 -24
  4. label_studio_sdk/base_client.py +3 -0
  5. label_studio_sdk/core/client_wrapper.py +1 -1
  6. label_studio_sdk/core/http_client.py +36 -8
  7. label_studio_sdk/core/request_options.py +2 -2
  8. label_studio_sdk/export_storage/__init__.py +2 -1
  9. label_studio_sdk/export_storage/azure/client.py +28 -28
  10. label_studio_sdk/export_storage/client.py +7 -4
  11. label_studio_sdk/export_storage/gcs/client.py +28 -28
  12. label_studio_sdk/export_storage/local/client.py +28 -28
  13. label_studio_sdk/export_storage/redis/client.py +28 -28
  14. label_studio_sdk/export_storage/s3/client.py +28 -28
  15. label_studio_sdk/export_storage/s3s/__init__.py +2 -0
  16. label_studio_sdk/export_storage/s3s/client.py +836 -0
  17. label_studio_sdk/files/client.py +24 -24
  18. label_studio_sdk/import_storage/__init__.py +2 -1
  19. label_studio_sdk/import_storage/azure/client.py +28 -28
  20. label_studio_sdk/import_storage/client.py +7 -4
  21. label_studio_sdk/import_storage/gcs/client.py +28 -28
  22. label_studio_sdk/import_storage/local/client.py +28 -28
  23. label_studio_sdk/import_storage/redis/client.py +28 -28
  24. label_studio_sdk/import_storage/s3/client.py +28 -28
  25. label_studio_sdk/import_storage/s3s/__init__.py +2 -0
  26. label_studio_sdk/import_storage/s3s/client.py +1054 -0
  27. label_studio_sdk/label_interface/base.py +2 -2
  28. label_studio_sdk/label_interface/control_tags.py +32 -18
  29. label_studio_sdk/label_interface/create.py +241 -0
  30. label_studio_sdk/label_interface/interface.py +68 -0
  31. label_studio_sdk/label_interface/object_tags.py +26 -10
  32. label_studio_sdk/label_interface/objects.py +5 -5
  33. label_studio_sdk/ml/client.py +36 -36
  34. label_studio_sdk/predictions/client.py +24 -24
  35. label_studio_sdk/projects/__init__.py +8 -2
  36. label_studio_sdk/projects/client.py +232 -69
  37. label_studio_sdk/projects/client_ext.py +16 -1
  38. label_studio_sdk/projects/exports/client.py +38 -38
  39. label_studio_sdk/projects/types/__init__.py +2 -1
  40. label_studio_sdk/projects/types/projects_update_response.py +96 -0
  41. label_studio_sdk/tasks/client.py +70 -60
  42. label_studio_sdk/tasks/client_ext.py +4 -0
  43. label_studio_sdk/types/__init__.py +16 -0
  44. label_studio_sdk/types/base_task.py +4 -2
  45. label_studio_sdk/types/base_task_file_upload.py +5 -0
  46. label_studio_sdk/types/base_task_updated_by.py +5 -0
  47. label_studio_sdk/types/data_manager_task_serializer.py +3 -2
  48. label_studio_sdk/types/data_manager_task_serializer_annotators_item.py +5 -0
  49. label_studio_sdk/types/s3s_export_storage.py +80 -0
  50. label_studio_sdk/types/s3s_import_storage.py +129 -0
  51. label_studio_sdk/types/s3s_import_storage_status.py +7 -0
  52. label_studio_sdk/types/task.py +3 -2
  53. label_studio_sdk/types/task_annotators_item.py +5 -0
  54. label_studio_sdk/types/workspace.py +77 -0
  55. label_studio_sdk/users/client.py +32 -32
  56. label_studio_sdk/views/client.py +24 -24
  57. label_studio_sdk/webhooks/client.py +24 -24
  58. label_studio_sdk/workspaces/__init__.py +6 -0
  59. label_studio_sdk/workspaces/client.py +569 -0
  60. label_studio_sdk/workspaces/members/__init__.py +5 -0
  61. label_studio_sdk/workspaces/members/client.py +297 -0
  62. label_studio_sdk/workspaces/members/types/__init__.py +6 -0
  63. label_studio_sdk/workspaces/members/types/members_create_response.py +32 -0
  64. label_studio_sdk/workspaces/members/types/members_list_response_item.py +32 -0
  65. {label_studio_sdk-1.0.2.dist-info → label_studio_sdk-1.0.4.dist-info}/METADATA +11 -12
  66. {label_studio_sdk-1.0.2.dist-info → label_studio_sdk-1.0.4.dist-info}/RECORD +67 -46
  67. {label_studio_sdk-1.0.2.dist-info → label_studio_sdk-1.0.4.dist-info}/WHEEL +0 -0
@@ -6,6 +6,7 @@ import typing
6
6
  from ..core.datetime_utils import serialize_datetime
7
7
  from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
8
  from .annotations_dm_field import AnnotationsDmField
9
+ from .data_manager_task_serializer_annotators_item import DataManagerTaskSerializerAnnotatorsItem
9
10
  from .data_manager_task_serializer_drafts_item import DataManagerTaskSerializerDraftsItem
10
11
  from .data_manager_task_serializer_predictions_item import DataManagerTaskSerializerPredictionsItem
11
12
 
@@ -25,9 +26,9 @@ class DataManagerTaskSerializer(pydantic_v1.BaseModel):
25
26
  Drafts for this task
26
27
  """
27
28
 
28
- annotators: typing.Optional[typing.List[int]] = pydantic_v1.Field(default=None)
29
+ annotators: typing.Optional[typing.List[DataManagerTaskSerializerAnnotatorsItem]] = pydantic_v1.Field(default=None)
29
30
  """
30
- Annotators IDs who annotated this task
31
+ Annotators who annotated this task
31
32
  """
32
33
 
33
34
  inner_id: typing.Optional[int] = None
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ DataManagerTaskSerializerAnnotatorsItem = typing.Union[int, typing.Dict[str, typing.Any]]
@@ -0,0 +1,80 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
+
9
+
10
+ class S3SExportStorage(pydantic_v1.BaseModel):
11
+ id: typing.Optional[int] = None
12
+ title: typing.Optional[str] = pydantic_v1.Field(default=None)
13
+ """
14
+ Cloud storage title
15
+ """
16
+
17
+ description: typing.Optional[str] = pydantic_v1.Field(default=None)
18
+ """
19
+ Cloud storage description
20
+ """
21
+
22
+ created_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
23
+ """
24
+ Creation time
25
+ """
26
+
27
+ bucket: typing.Optional[str] = pydantic_v1.Field(default=None)
28
+ """
29
+ S3 bucket name
30
+ """
31
+
32
+ prefix: typing.Optional[str] = pydantic_v1.Field(default=None)
33
+ """
34
+ S3 bucket prefix
35
+ """
36
+
37
+ external_id: typing.Optional[str] = pydantic_v1.Field(default=None)
38
+ """
39
+ AWS External ID
40
+ """
41
+
42
+ role_arn: typing.Optional[str] = pydantic_v1.Field(default=None)
43
+ """
44
+ AWS Role ARN
45
+ """
46
+
47
+ region_name: typing.Optional[str] = pydantic_v1.Field(default=None)
48
+ """
49
+ AWS Region
50
+ """
51
+
52
+ s3endpoint: typing.Optional[str] = pydantic_v1.Field(alias="s3_endpoint", default=None)
53
+ """
54
+ S3 Endpoint
55
+ """
56
+
57
+ project: int = pydantic_v1.Field()
58
+ """
59
+ A unique integer value identifying this project.
60
+ """
61
+
62
+ def json(self, **kwargs: typing.Any) -> str:
63
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
64
+ return super().json(**kwargs_with_defaults)
65
+
66
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
67
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
68
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
69
+
70
+ return deep_union_pydantic_dicts(
71
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
72
+ )
73
+
74
+ class Config:
75
+ frozen = True
76
+ smart_union = True
77
+ allow_population_by_field_name = True
78
+ populate_by_name = True
79
+ extra = pydantic_v1.Extra.allow
80
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,129 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
+ from .s3s_import_storage_status import S3SImportStorageStatus
9
+
10
+
11
+ class S3SImportStorage(pydantic_v1.BaseModel):
12
+ id: typing.Optional[int] = None
13
+ synchronizable: typing.Optional[bool] = None
14
+ presign: typing.Optional[bool] = None
15
+ last_sync: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
16
+ """
17
+ Last sync finished time
18
+ """
19
+
20
+ last_sync_count: typing.Optional[int] = pydantic_v1.Field(default=None)
21
+ """
22
+ Count of tasks synced last time
23
+ """
24
+
25
+ last_sync_job: typing.Optional[str] = pydantic_v1.Field(default=None)
26
+ """
27
+ Last sync job ID
28
+ """
29
+
30
+ status: typing.Optional[S3SImportStorageStatus] = None
31
+ traceback: typing.Optional[str] = pydantic_v1.Field(default=None)
32
+ """
33
+ Traceback report for the last failed sync
34
+ """
35
+
36
+ meta: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(default=None)
37
+ """
38
+ Meta and debug information about storage processes
39
+ """
40
+
41
+ title: typing.Optional[str] = pydantic_v1.Field(default=None)
42
+ """
43
+ Cloud storage title
44
+ """
45
+
46
+ description: typing.Optional[str] = pydantic_v1.Field(default=None)
47
+ """
48
+ Cloud storage description
49
+ """
50
+
51
+ created_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
52
+ """
53
+ Creation time
54
+ """
55
+
56
+ bucket: typing.Optional[str] = pydantic_v1.Field(default=None)
57
+ """
58
+ S3 bucket name
59
+ """
60
+
61
+ prefix: typing.Optional[str] = pydantic_v1.Field(default=None)
62
+ """
63
+ S3 bucket prefix
64
+ """
65
+
66
+ regex_filter: typing.Optional[str] = pydantic_v1.Field(default=None)
67
+ """
68
+ Cloud storage regex for filtering objects
69
+ """
70
+
71
+ use_blob_urls: typing.Optional[bool] = pydantic_v1.Field(default=None)
72
+ """
73
+ Interpret objects as BLOBs and generate URLs
74
+ """
75
+
76
+ region_name: typing.Optional[str] = pydantic_v1.Field(default=None)
77
+ """
78
+ AWS Region
79
+ """
80
+
81
+ external_id: typing.Optional[str] = pydantic_v1.Field(default=None)
82
+ """
83
+ AWS External ID
84
+ """
85
+
86
+ role_arn: typing.Optional[str] = pydantic_v1.Field(default=None)
87
+ """
88
+ AWS Role ARN
89
+ """
90
+
91
+ s3endpoint: typing.Optional[str] = pydantic_v1.Field(alias="s3_endpoint", default=None)
92
+ """
93
+ S3 Endpoint
94
+ """
95
+
96
+ presign_ttl: typing.Optional[int] = pydantic_v1.Field(default=None)
97
+ """
98
+ Presigned URLs TTL (in minutes)
99
+ """
100
+
101
+ recursive_scan: typing.Optional[bool] = pydantic_v1.Field(default=None)
102
+ """
103
+ Perform recursive scan over the bucket content
104
+ """
105
+
106
+ project: int = pydantic_v1.Field()
107
+ """
108
+ A unique integer value identifying this project.
109
+ """
110
+
111
+ def json(self, **kwargs: typing.Any) -> str:
112
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
113
+ return super().json(**kwargs_with_defaults)
114
+
115
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
116
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
117
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
118
+
119
+ return deep_union_pydantic_dicts(
120
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
121
+ )
122
+
123
+ class Config:
124
+ frozen = True
125
+ smart_union = True
126
+ allow_population_by_field_name = True
127
+ populate_by_name = True
128
+ extra = pydantic_v1.Extra.allow
129
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ S3SImportStorageStatus = typing.Union[
6
+ typing.Literal["initialized", "queued", "in_progress", "failed", "completed"], typing.Any
7
+ ]
@@ -5,6 +5,7 @@ import typing
5
5
 
6
6
  from ..core.datetime_utils import serialize_datetime
7
7
  from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
+ from .task_annotators_item import TaskAnnotatorsItem
8
9
 
9
10
 
10
11
  class Task(pydantic_v1.BaseModel):
@@ -28,9 +29,9 @@ class Task(pydantic_v1.BaseModel):
28
29
  Drafts for this task
29
30
  """
30
31
 
31
- annotators: typing.Optional[typing.List[int]] = pydantic_v1.Field(default=None)
32
+ annotators: typing.Optional[typing.List[TaskAnnotatorsItem]] = pydantic_v1.Field(default=None)
32
33
  """
33
- List of annotators' IDs for this task
34
+ List of annotators for this task
34
35
  """
35
36
 
36
37
  inner_id: typing.Optional[int] = pydantic_v1.Field(default=None)
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ TaskAnnotatorsItem = typing.Union[int, typing.Dict[str, typing.Any]]
@@ -0,0 +1,77 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
+
9
+
10
+ class Workspace(pydantic_v1.BaseModel):
11
+ id: typing.Optional[int] = pydantic_v1.Field(default=None)
12
+ """
13
+ Unique ID of the workspace
14
+ """
15
+
16
+ title: typing.Optional[str] = pydantic_v1.Field(default=None)
17
+ """
18
+ Workspace title
19
+ """
20
+
21
+ description: typing.Optional[str] = pydantic_v1.Field(default=None)
22
+ """
23
+ Workspace description
24
+ """
25
+
26
+ is_public: typing.Optional[bool] = pydantic_v1.Field(default=None)
27
+ """
28
+ Whether the workspace is public or not
29
+ """
30
+
31
+ is_personal: typing.Optional[bool] = pydantic_v1.Field(default=None)
32
+ """
33
+ Whether the workspace is personal or not
34
+ """
35
+
36
+ is_archived: typing.Optional[bool] = pydantic_v1.Field(default=None)
37
+ """
38
+ Whether the workspace is archived or not
39
+ """
40
+
41
+ created_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
42
+ """
43
+ Creation time of the workspace
44
+ """
45
+
46
+ updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
47
+ """
48
+ Last updated time of the workspace
49
+ """
50
+
51
+ created_by: typing.Optional[int] = pydantic_v1.Field(default=None)
52
+ """
53
+ User ID of the workspace creator
54
+ """
55
+
56
+ color: typing.Optional[str] = pydantic_v1.Field(default=None)
57
+ """
58
+ Workspace color
59
+ """
60
+
61
+ def json(self, **kwargs: typing.Any) -> str:
62
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
63
+ return super().json(**kwargs_with_defaults)
64
+
65
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
66
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
67
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
68
+
69
+ return deep_union_pydantic_dicts(
70
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
71
+ )
72
+
73
+ class Config:
74
+ frozen = True
75
+ smart_union = True
76
+ extra = pydantic_v1.Extra.allow
77
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -46,9 +46,9 @@ class UsersClient:
46
46
  _response = self._client_wrapper.httpx_client.request(
47
47
  "api/current-user/reset-token/", method="POST", request_options=request_options
48
48
  )
49
- if 200 <= _response.status_code < 300:
50
- return pydantic_v1.parse_obj_as(UsersResetTokenResponse, _response.json()) # type: ignore
51
49
  try:
50
+ if 200 <= _response.status_code < 300:
51
+ return pydantic_v1.parse_obj_as(UsersResetTokenResponse, _response.json()) # type: ignore
52
52
  _response_json = _response.json()
53
53
  except JSONDecodeError:
54
54
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -80,9 +80,9 @@ class UsersClient:
80
80
  _response = self._client_wrapper.httpx_client.request(
81
81
  "api/current-user/token", method="GET", request_options=request_options
82
82
  )
83
- if 200 <= _response.status_code < 300:
84
- return pydantic_v1.parse_obj_as(UsersGetTokenResponse, _response.json()) # type: ignore
85
83
  try:
84
+ if 200 <= _response.status_code < 300:
85
+ return pydantic_v1.parse_obj_as(UsersGetTokenResponse, _response.json()) # type: ignore
86
86
  _response_json = _response.json()
87
87
  except JSONDecodeError:
88
88
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -114,9 +114,9 @@ class UsersClient:
114
114
  _response = self._client_wrapper.httpx_client.request(
115
115
  "api/current-user/whoami", method="GET", request_options=request_options
116
116
  )
117
- if 200 <= _response.status_code < 300:
118
- return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
119
117
  try:
118
+ if 200 <= _response.status_code < 300:
119
+ return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
120
120
  _response_json = _response.json()
121
121
  except JSONDecodeError:
122
122
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -148,9 +148,9 @@ class UsersClient:
148
148
  _response = self._client_wrapper.httpx_client.request(
149
149
  "api/users/", method="GET", request_options=request_options
150
150
  )
151
- if 200 <= _response.status_code < 300:
152
- return pydantic_v1.parse_obj_as(typing.List[BaseUser], _response.json()) # type: ignore
153
151
  try:
152
+ if 200 <= _response.status_code < 300:
153
+ return pydantic_v1.parse_obj_as(typing.List[BaseUser], _response.json()) # type: ignore
154
154
  _response_json = _response.json()
155
155
  except JSONDecodeError:
156
156
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -236,9 +236,9 @@ class UsersClient:
236
236
  request_options=request_options,
237
237
  omit=OMIT,
238
238
  )
239
- if 200 <= _response.status_code < 300:
240
- return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
241
239
  try:
240
+ if 200 <= _response.status_code < 300:
241
+ return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
242
242
  _response_json = _response.json()
243
243
  except JSONDecodeError:
244
244
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -276,9 +276,9 @@ class UsersClient:
276
276
  _response = self._client_wrapper.httpx_client.request(
277
277
  f"api/users/{jsonable_encoder(id)}/", method="GET", request_options=request_options
278
278
  )
279
- if 200 <= _response.status_code < 300:
280
- return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
281
279
  try:
280
+ if 200 <= _response.status_code < 300:
281
+ return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
282
282
  _response_json = _response.json()
283
283
  except JSONDecodeError:
284
284
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -318,9 +318,9 @@ class UsersClient:
318
318
  _response = self._client_wrapper.httpx_client.request(
319
319
  f"api/users/{jsonable_encoder(id)}/", method="DELETE", request_options=request_options
320
320
  )
321
- if 200 <= _response.status_code < 300:
322
- return
323
321
  try:
322
+ if 200 <= _response.status_code < 300:
323
+ return
324
324
  _response_json = _response.json()
325
325
  except JSONDecodeError:
326
326
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -414,9 +414,9 @@ class UsersClient:
414
414
  request_options=request_options,
415
415
  omit=OMIT,
416
416
  )
417
- if 200 <= _response.status_code < 300:
418
- return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
419
417
  try:
418
+ if 200 <= _response.status_code < 300:
419
+ return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
420
420
  _response_json = _response.json()
421
421
  except JSONDecodeError:
422
422
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -453,9 +453,9 @@ class AsyncUsersClient:
453
453
  _response = await self._client_wrapper.httpx_client.request(
454
454
  "api/current-user/reset-token/", method="POST", request_options=request_options
455
455
  )
456
- if 200 <= _response.status_code < 300:
457
- return pydantic_v1.parse_obj_as(UsersResetTokenResponse, _response.json()) # type: ignore
458
456
  try:
457
+ if 200 <= _response.status_code < 300:
458
+ return pydantic_v1.parse_obj_as(UsersResetTokenResponse, _response.json()) # type: ignore
459
459
  _response_json = _response.json()
460
460
  except JSONDecodeError:
461
461
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -487,9 +487,9 @@ class AsyncUsersClient:
487
487
  _response = await self._client_wrapper.httpx_client.request(
488
488
  "api/current-user/token", method="GET", request_options=request_options
489
489
  )
490
- if 200 <= _response.status_code < 300:
491
- return pydantic_v1.parse_obj_as(UsersGetTokenResponse, _response.json()) # type: ignore
492
490
  try:
491
+ if 200 <= _response.status_code < 300:
492
+ return pydantic_v1.parse_obj_as(UsersGetTokenResponse, _response.json()) # type: ignore
493
493
  _response_json = _response.json()
494
494
  except JSONDecodeError:
495
495
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -521,9 +521,9 @@ class AsyncUsersClient:
521
521
  _response = await self._client_wrapper.httpx_client.request(
522
522
  "api/current-user/whoami", method="GET", request_options=request_options
523
523
  )
524
- if 200 <= _response.status_code < 300:
525
- return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
526
524
  try:
525
+ if 200 <= _response.status_code < 300:
526
+ return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
527
527
  _response_json = _response.json()
528
528
  except JSONDecodeError:
529
529
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -555,9 +555,9 @@ class AsyncUsersClient:
555
555
  _response = await self._client_wrapper.httpx_client.request(
556
556
  "api/users/", method="GET", request_options=request_options
557
557
  )
558
- if 200 <= _response.status_code < 300:
559
- return pydantic_v1.parse_obj_as(typing.List[BaseUser], _response.json()) # type: ignore
560
558
  try:
559
+ if 200 <= _response.status_code < 300:
560
+ return pydantic_v1.parse_obj_as(typing.List[BaseUser], _response.json()) # type: ignore
561
561
  _response_json = _response.json()
562
562
  except JSONDecodeError:
563
563
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -643,9 +643,9 @@ class AsyncUsersClient:
643
643
  request_options=request_options,
644
644
  omit=OMIT,
645
645
  )
646
- if 200 <= _response.status_code < 300:
647
- return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
648
646
  try:
647
+ if 200 <= _response.status_code < 300:
648
+ return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
649
649
  _response_json = _response.json()
650
650
  except JSONDecodeError:
651
651
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -683,9 +683,9 @@ class AsyncUsersClient:
683
683
  _response = await self._client_wrapper.httpx_client.request(
684
684
  f"api/users/{jsonable_encoder(id)}/", method="GET", request_options=request_options
685
685
  )
686
- if 200 <= _response.status_code < 300:
687
- return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
688
686
  try:
687
+ if 200 <= _response.status_code < 300:
688
+ return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
689
689
  _response_json = _response.json()
690
690
  except JSONDecodeError:
691
691
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -725,9 +725,9 @@ class AsyncUsersClient:
725
725
  _response = await self._client_wrapper.httpx_client.request(
726
726
  f"api/users/{jsonable_encoder(id)}/", method="DELETE", request_options=request_options
727
727
  )
728
- if 200 <= _response.status_code < 300:
729
- return
730
728
  try:
729
+ if 200 <= _response.status_code < 300:
730
+ return
731
731
  _response_json = _response.json()
732
732
  except JSONDecodeError:
733
733
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -821,9 +821,9 @@ class AsyncUsersClient:
821
821
  request_options=request_options,
822
822
  omit=OMIT,
823
823
  )
824
- if 200 <= _response.status_code < 300:
825
- return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
826
824
  try:
825
+ if 200 <= _response.status_code < 300:
826
+ return pydantic_v1.parse_obj_as(BaseUser, _response.json()) # type: ignore
827
827
  _response_json = _response.json()
828
828
  except JSONDecodeError:
829
829
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -53,9 +53,9 @@ class ViewsClient:
53
53
  _response = self._client_wrapper.httpx_client.request(
54
54
  "api/dm/views/", method="GET", params={"project": project}, request_options=request_options
55
55
  )
56
- if 200 <= _response.status_code < 300:
57
- return pydantic_v1.parse_obj_as(typing.List[View], _response.json()) # type: ignore
58
56
  try:
57
+ if 200 <= _response.status_code < 300:
58
+ return pydantic_v1.parse_obj_as(typing.List[View], _response.json()) # type: ignore
59
59
  _response_json = _response.json()
60
60
  except JSONDecodeError:
61
61
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -105,9 +105,9 @@ class ViewsClient:
105
105
  request_options=request_options,
106
106
  omit=OMIT,
107
107
  )
108
- if 200 <= _response.status_code < 300:
109
- return pydantic_v1.parse_obj_as(View, _response.json()) # type: ignore
110
108
  try:
109
+ if 200 <= _response.status_code < 300:
110
+ return pydantic_v1.parse_obj_as(View, _response.json()) # type: ignore
111
111
  _response_json = _response.json()
112
112
  except JSONDecodeError:
113
113
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -148,9 +148,9 @@ class ViewsClient:
148
148
  request_options=request_options,
149
149
  omit=OMIT,
150
150
  )
151
- if 200 <= _response.status_code < 300:
152
- return
153
151
  try:
152
+ if 200 <= _response.status_code < 300:
153
+ return
154
154
  _response_json = _response.json()
155
155
  except JSONDecodeError:
156
156
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -187,9 +187,9 @@ class ViewsClient:
187
187
  _response = self._client_wrapper.httpx_client.request(
188
188
  f"api/dm/views/{jsonable_encoder(id)}/", method="GET", request_options=request_options
189
189
  )
190
- if 200 <= _response.status_code < 300:
191
- return pydantic_v1.parse_obj_as(View, _response.json()) # type: ignore
192
190
  try:
191
+ if 200 <= _response.status_code < 300:
192
+ return pydantic_v1.parse_obj_as(View, _response.json()) # type: ignore
193
193
  _response_json = _response.json()
194
194
  except JSONDecodeError:
195
195
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -225,9 +225,9 @@ class ViewsClient:
225
225
  _response = self._client_wrapper.httpx_client.request(
226
226
  f"api/dm/views/{jsonable_encoder(id)}/", method="DELETE", request_options=request_options
227
227
  )
228
- if 200 <= _response.status_code < 300:
229
- return
230
228
  try:
229
+ if 200 <= _response.status_code < 300:
230
+ return
231
231
  _response_json = _response.json()
232
232
  except JSONDecodeError:
233
233
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -281,9 +281,9 @@ class ViewsClient:
281
281
  request_options=request_options,
282
282
  omit=OMIT,
283
283
  )
284
- if 200 <= _response.status_code < 300:
285
- return pydantic_v1.parse_obj_as(View, _response.json()) # type: ignore
286
284
  try:
285
+ if 200 <= _response.status_code < 300:
286
+ return pydantic_v1.parse_obj_as(View, _response.json()) # type: ignore
287
287
  _response_json = _response.json()
288
288
  except JSONDecodeError:
289
289
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -327,9 +327,9 @@ class AsyncViewsClient:
327
327
  _response = await self._client_wrapper.httpx_client.request(
328
328
  "api/dm/views/", method="GET", params={"project": project}, request_options=request_options
329
329
  )
330
- if 200 <= _response.status_code < 300:
331
- return pydantic_v1.parse_obj_as(typing.List[View], _response.json()) # type: ignore
332
330
  try:
331
+ if 200 <= _response.status_code < 300:
332
+ return pydantic_v1.parse_obj_as(typing.List[View], _response.json()) # type: ignore
333
333
  _response_json = _response.json()
334
334
  except JSONDecodeError:
335
335
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -379,9 +379,9 @@ class AsyncViewsClient:
379
379
  request_options=request_options,
380
380
  omit=OMIT,
381
381
  )
382
- if 200 <= _response.status_code < 300:
383
- return pydantic_v1.parse_obj_as(View, _response.json()) # type: ignore
384
382
  try:
383
+ if 200 <= _response.status_code < 300:
384
+ return pydantic_v1.parse_obj_as(View, _response.json()) # type: ignore
385
385
  _response_json = _response.json()
386
386
  except JSONDecodeError:
387
387
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -422,9 +422,9 @@ class AsyncViewsClient:
422
422
  request_options=request_options,
423
423
  omit=OMIT,
424
424
  )
425
- if 200 <= _response.status_code < 300:
426
- return
427
425
  try:
426
+ if 200 <= _response.status_code < 300:
427
+ return
428
428
  _response_json = _response.json()
429
429
  except JSONDecodeError:
430
430
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -461,9 +461,9 @@ class AsyncViewsClient:
461
461
  _response = await self._client_wrapper.httpx_client.request(
462
462
  f"api/dm/views/{jsonable_encoder(id)}/", method="GET", request_options=request_options
463
463
  )
464
- if 200 <= _response.status_code < 300:
465
- return pydantic_v1.parse_obj_as(View, _response.json()) # type: ignore
466
464
  try:
465
+ if 200 <= _response.status_code < 300:
466
+ return pydantic_v1.parse_obj_as(View, _response.json()) # type: ignore
467
467
  _response_json = _response.json()
468
468
  except JSONDecodeError:
469
469
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -499,9 +499,9 @@ class AsyncViewsClient:
499
499
  _response = await self._client_wrapper.httpx_client.request(
500
500
  f"api/dm/views/{jsonable_encoder(id)}/", method="DELETE", request_options=request_options
501
501
  )
502
- if 200 <= _response.status_code < 300:
503
- return
504
502
  try:
503
+ if 200 <= _response.status_code < 300:
504
+ return
505
505
  _response_json = _response.json()
506
506
  except JSONDecodeError:
507
507
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -555,9 +555,9 @@ class AsyncViewsClient:
555
555
  request_options=request_options,
556
556
  omit=OMIT,
557
557
  )
558
- if 200 <= _response.status_code < 300:
559
- return pydantic_v1.parse_obj_as(View, _response.json()) # type: ignore
560
558
  try:
559
+ if 200 <= _response.status_code < 300:
560
+ return pydantic_v1.parse_obj_as(View, _response.json()) # type: ignore
561
561
  _response_json = _response.json()
562
562
  except JSONDecodeError:
563
563
  raise ApiError(status_code=_response.status_code, body=_response.text)