label-studio-sdk 2.0.5__py3-none-any.whl → 2.0.7__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 (92) hide show
  1. label_studio_sdk/__init__.py +70 -0
  2. label_studio_sdk/annotation_history/__init__.py +5 -0
  3. label_studio_sdk/annotation_history/client.py +415 -0
  4. label_studio_sdk/annotation_history/types/__init__.py +5 -0
  5. label_studio_sdk/annotation_history/types/annotation_history_delete_response.py +22 -0
  6. label_studio_sdk/annotation_reviews/__init__.py +2 -0
  7. label_studio_sdk/annotation_reviews/client.py +713 -0
  8. label_studio_sdk/base_client.py +20 -0
  9. label_studio_sdk/blueprints/__init__.py +2 -0
  10. label_studio_sdk/blueprints/client.py +272 -0
  11. label_studio_sdk/core/client_wrapper.py +2 -1
  12. label_studio_sdk/export_storage/__init__.py +2 -2
  13. label_studio_sdk/export_storage/azure_spi/__init__.py +2 -0
  14. label_studio_sdk/export_storage/azure_spi/client.py +1354 -0
  15. label_studio_sdk/export_storage/client.py +8 -0
  16. label_studio_sdk/export_storage/gcswif/__init__.py +2 -0
  17. label_studio_sdk/export_storage/gcswif/client.py +1376 -0
  18. label_studio_sdk/import_storage/__init__.py +2 -2
  19. label_studio_sdk/import_storage/azure_spi/__init__.py +2 -0
  20. label_studio_sdk/import_storage/azure_spi/client.py +1378 -0
  21. label_studio_sdk/import_storage/client.py +8 -0
  22. label_studio_sdk/import_storage/gcswif/__init__.py +2 -0
  23. label_studio_sdk/import_storage/gcswif/client.py +1400 -0
  24. label_studio_sdk/jwt_settings/client.py +10 -8
  25. label_studio_sdk/label_interface/control_tags.py +38 -0
  26. label_studio_sdk/label_interface/data_examples.json +10 -0
  27. label_studio_sdk/label_interface/interface.py +13 -0
  28. label_studio_sdk/label_interface/object_tags.py +9 -0
  29. label_studio_sdk/ml/client.py +124 -0
  30. label_studio_sdk/organizations/__init__.py +3 -2
  31. label_studio_sdk/organizations/client.py +536 -1
  32. label_studio_sdk/organizations/invites/__init__.py +2 -0
  33. label_studio_sdk/organizations/invites/client.py +368 -0
  34. label_studio_sdk/organizations/types/__init__.py +5 -0
  35. label_studio_sdk/organizations/types/patched_default_role_request_custom_scripts_editable_by.py +7 -0
  36. label_studio_sdk/project_templates/__init__.py +2 -0
  37. label_studio_sdk/project_templates/client.py +909 -0
  38. label_studio_sdk/projects/client.py +8 -0
  39. label_studio_sdk/projects/members/__init__.py +2 -2
  40. label_studio_sdk/projects/members/bulk/client.py +46 -2
  41. label_studio_sdk/projects/members/client.py +4 -0
  42. label_studio_sdk/projects/members/paginated/__init__.py +2 -0
  43. label_studio_sdk/projects/members/paginated/client.py +248 -0
  44. label_studio_sdk/session_policy/__init__.py +2 -0
  45. label_studio_sdk/session_policy/client.py +247 -0
  46. label_studio_sdk/tasks/client.py +371 -0
  47. label_studio_sdk/types/__init__.py +56 -0
  48. label_studio_sdk/types/action_enum.py +19 -0
  49. label_studio_sdk/types/all_roles_project_list.py +1 -1
  50. label_studio_sdk/types/annotation.py +7 -0
  51. label_studio_sdk/types/annotation_history.py +81 -0
  52. label_studio_sdk/types/annotation_history_action.py +7 -0
  53. label_studio_sdk/types/annotation_request.py +7 -0
  54. label_studio_sdk/types/annotation_review.py +61 -0
  55. label_studio_sdk/types/annotation_review_request.py +41 -0
  56. label_studio_sdk/types/azure_service_principal_export_storage.py +114 -0
  57. label_studio_sdk/types/azure_service_principal_export_storage_request.py +107 -0
  58. label_studio_sdk/types/azure_service_principal_import_storage.py +115 -0
  59. label_studio_sdk/types/azure_service_principal_import_storage_request.py +108 -0
  60. label_studio_sdk/types/blueprint.py +41 -0
  61. label_studio_sdk/types/default_role.py +75 -0
  62. label_studio_sdk/types/default_role_custom_scripts_editable_by.py +7 -0
  63. label_studio_sdk/types/gcswif_export_storage.py +119 -0
  64. label_studio_sdk/types/gcswif_export_storage_request.py +112 -0
  65. label_studio_sdk/types/gcswif_import_storage.py +120 -0
  66. label_studio_sdk/types/gcswif_import_storage_request.py +113 -0
  67. label_studio_sdk/types/lse_project.py +223 -0
  68. label_studio_sdk/types/lse_project_sampling.py +7 -0
  69. label_studio_sdk/types/lse_project_skip_queue.py +7 -0
  70. label_studio_sdk/types/lse_project_update.py +1 -0
  71. label_studio_sdk/types/lse_task.py +1 -0
  72. label_studio_sdk/types/lse_task_serializer_for_reviewers.py +1 -0
  73. label_studio_sdk/types/lsejwt_settings.py +1 -5
  74. label_studio_sdk/types/paginated_annotation_history_list.py +23 -0
  75. label_studio_sdk/types/paginated_lse_user_list.py +23 -0
  76. label_studio_sdk/types/paginated_paginated_project_member_list.py +23 -0
  77. label_studio_sdk/types/paginated_project_member.py +50 -0
  78. label_studio_sdk/types/project_member_bulk_assign_roles_request.py +21 -0
  79. label_studio_sdk/types/project_template.py +41 -0
  80. label_studio_sdk/types/project_template_request.py +38 -0
  81. label_studio_sdk/types/review_settings.py +5 -0
  82. label_studio_sdk/types/review_settings_request.py +5 -0
  83. label_studio_sdk/types/session_timeout_policy.py +31 -0
  84. label_studio_sdk/types/task_event.py +61 -0
  85. label_studio_sdk/workspaces/members/__init__.py +2 -2
  86. label_studio_sdk/workspaces/members/client.py +4 -0
  87. label_studio_sdk/workspaces/members/paginated/__init__.py +2 -0
  88. label_studio_sdk/workspaces/members/paginated/client.py +212 -0
  89. {label_studio_sdk-2.0.5.dist-info → label_studio_sdk-2.0.7.dist-info}/METADATA +2 -2
  90. {label_studio_sdk-2.0.5.dist-info → label_studio_sdk-2.0.7.dist-info}/RECORD +92 -36
  91. {label_studio_sdk-2.0.5.dist-info → label_studio_sdk-2.0.7.dist-info}/LICENSE +0 -0
  92. {label_studio_sdk-2.0.5.dist-info → label_studio_sdk-2.0.7.dist-info}/WHEEL +0 -0
@@ -490,6 +490,7 @@ class ProjectsClient:
490
490
  show_instruction: typing.Optional[bool] = OMIT,
491
491
  show_overlap_first: typing.Optional[bool] = OMIT,
492
492
  show_skip_button: typing.Optional[bool] = OMIT,
493
+ show_unused_data_columns_to_annotators: typing.Optional[bool] = OMIT,
493
494
  skip_queue: typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] = OMIT,
494
495
  task_data_login: typing.Optional[str] = OMIT,
495
496
  task_data_password: typing.Optional[str] = OMIT,
@@ -592,6 +593,8 @@ class ProjectsClient:
592
593
  show_skip_button : typing.Optional[bool]
593
594
  Show a skip button in interface and allow annotators to skip the task
594
595
 
596
+ show_unused_data_columns_to_annotators : typing.Optional[bool]
597
+
595
598
  skip_queue : typing.Optional[PatchedLseProjectUpdateRequestSkipQueue]
596
599
 
597
600
  task_data_login : typing.Optional[str]
@@ -671,6 +674,7 @@ class ProjectsClient:
671
674
  "show_instruction": show_instruction,
672
675
  "show_overlap_first": show_overlap_first,
673
676
  "show_skip_button": show_skip_button,
677
+ "show_unused_data_columns_to_annotators": show_unused_data_columns_to_annotators,
674
678
  "skip_queue": convert_and_respect_annotation_metadata(
675
679
  object_=skip_queue, annotation=PatchedLseProjectUpdateRequestSkipQueue, direction="write"
676
680
  ),
@@ -1452,6 +1456,7 @@ class AsyncProjectsClient:
1452
1456
  show_instruction: typing.Optional[bool] = OMIT,
1453
1457
  show_overlap_first: typing.Optional[bool] = OMIT,
1454
1458
  show_skip_button: typing.Optional[bool] = OMIT,
1459
+ show_unused_data_columns_to_annotators: typing.Optional[bool] = OMIT,
1455
1460
  skip_queue: typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] = OMIT,
1456
1461
  task_data_login: typing.Optional[str] = OMIT,
1457
1462
  task_data_password: typing.Optional[str] = OMIT,
@@ -1554,6 +1559,8 @@ class AsyncProjectsClient:
1554
1559
  show_skip_button : typing.Optional[bool]
1555
1560
  Show a skip button in interface and allow annotators to skip the task
1556
1561
 
1562
+ show_unused_data_columns_to_annotators : typing.Optional[bool]
1563
+
1557
1564
  skip_queue : typing.Optional[PatchedLseProjectUpdateRequestSkipQueue]
1558
1565
 
1559
1566
  task_data_login : typing.Optional[str]
@@ -1641,6 +1648,7 @@ class AsyncProjectsClient:
1641
1648
  "show_instruction": show_instruction,
1642
1649
  "show_overlap_first": show_overlap_first,
1643
1650
  "show_skip_button": show_skip_button,
1651
+ "show_unused_data_columns_to_annotators": show_unused_data_columns_to_annotators,
1644
1652
  "skip_queue": convert_and_respect_annotation_metadata(
1645
1653
  object_=skip_queue, annotation=PatchedLseProjectUpdateRequestSkipQueue, direction="write"
1646
1654
  ),
@@ -1,6 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from . import bulk
3
+ from . import bulk, paginated
4
4
  from .bulk import BulkDeleteResponse, BulkPostResponse
5
5
 
6
- __all__ = ["BulkDeleteResponse", "BulkPostResponse", "bulk"]
6
+ __all__ = ["BulkDeleteResponse", "BulkPostResponse", "bulk", "paginated"]
@@ -2,9 +2,11 @@
2
2
 
3
3
  import typing
4
4
  from ....core.client_wrapper import SyncClientWrapper
5
+ from ....types.project_member_bulk_assign_roles_request import ProjectMemberBulkAssignRolesRequest
5
6
  from ....core.request_options import RequestOptions
6
7
  from .types.bulk_post_response import BulkPostResponse
7
8
  from ....core.jsonable_encoder import jsonable_encoder
9
+ from ....core.serialization import convert_and_respect_annotation_metadata
8
10
  from ....core.unchecked_base_model import construct_type
9
11
  from json.decoder import JSONDecodeError
10
12
  from ....core.api_error import ApiError
@@ -24,8 +26,10 @@ class BulkClient:
24
26
  id: int,
25
27
  *,
26
28
  all_: bool,
29
+ search: typing.Optional[str] = None,
27
30
  excluded: typing.Optional[typing.Sequence[int]] = OMIT,
28
31
  included: typing.Optional[typing.Sequence[int]] = OMIT,
32
+ roles: typing.Optional[typing.Sequence[ProjectMemberBulkAssignRolesRequest]] = OMIT,
29
33
  request_options: typing.Optional[RequestOptions] = None,
30
34
  ) -> BulkPostResponse:
31
35
  """
@@ -37,10 +41,15 @@ class BulkClient:
37
41
 
38
42
  all_ : bool
39
43
 
44
+ search : typing.Optional[str]
45
+ Search term for filtering members by name, email, or username. Only when all=True.
46
+
40
47
  excluded : typing.Optional[typing.Sequence[int]]
41
48
 
42
49
  included : typing.Optional[typing.Sequence[int]]
43
50
 
51
+ roles : typing.Optional[typing.Sequence[ProjectMemberBulkAssignRolesRequest]]
52
+
44
53
  request_options : typing.Optional[RequestOptions]
45
54
  Request-specific configuration.
46
55
 
@@ -64,10 +73,16 @@ class BulkClient:
64
73
  _response = self._client_wrapper.httpx_client.request(
65
74
  f"api/projects/{jsonable_encoder(id)}/members/bulk/",
66
75
  method="POST",
76
+ params={
77
+ "search": search,
78
+ },
67
79
  json={
68
80
  "all": all_,
69
81
  "excluded": excluded,
70
82
  "included": included,
83
+ "roles": convert_and_respect_annotation_metadata(
84
+ object_=roles, annotation=typing.Sequence[ProjectMemberBulkAssignRolesRequest], direction="write"
85
+ ),
71
86
  },
72
87
  headers={
73
88
  "content-type": "application/json",
@@ -89,7 +104,9 @@ class BulkClient:
89
104
  raise ApiError(status_code=_response.status_code, body=_response.text)
90
105
  raise ApiError(status_code=_response.status_code, body=_response_json)
91
106
 
92
- def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> BulkDeleteResponse:
107
+ def delete(
108
+ self, id: int, *, search: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
109
+ ) -> BulkDeleteResponse:
93
110
  """
94
111
  Unassign project members in bulk. Allows the same request body as bulk assign.
95
112
 
@@ -97,6 +114,9 @@ class BulkClient:
97
114
  ----------
98
115
  id : int
99
116
 
117
+ search : typing.Optional[str]
118
+ Search term for filtering members by name, email, or username. Only when all=True.
119
+
100
120
  request_options : typing.Optional[RequestOptions]
101
121
  Request-specific configuration.
102
122
 
@@ -119,6 +139,9 @@ class BulkClient:
119
139
  _response = self._client_wrapper.httpx_client.request(
120
140
  f"api/projects/{jsonable_encoder(id)}/members/bulk/",
121
141
  method="DELETE",
142
+ params={
143
+ "search": search,
144
+ },
122
145
  request_options=request_options,
123
146
  )
124
147
  try:
@@ -145,8 +168,10 @@ class AsyncBulkClient:
145
168
  id: int,
146
169
  *,
147
170
  all_: bool,
171
+ search: typing.Optional[str] = None,
148
172
  excluded: typing.Optional[typing.Sequence[int]] = OMIT,
149
173
  included: typing.Optional[typing.Sequence[int]] = OMIT,
174
+ roles: typing.Optional[typing.Sequence[ProjectMemberBulkAssignRolesRequest]] = OMIT,
150
175
  request_options: typing.Optional[RequestOptions] = None,
151
176
  ) -> BulkPostResponse:
152
177
  """
@@ -158,10 +183,15 @@ class AsyncBulkClient:
158
183
 
159
184
  all_ : bool
160
185
 
186
+ search : typing.Optional[str]
187
+ Search term for filtering members by name, email, or username. Only when all=True.
188
+
161
189
  excluded : typing.Optional[typing.Sequence[int]]
162
190
 
163
191
  included : typing.Optional[typing.Sequence[int]]
164
192
 
193
+ roles : typing.Optional[typing.Sequence[ProjectMemberBulkAssignRolesRequest]]
194
+
165
195
  request_options : typing.Optional[RequestOptions]
166
196
  Request-specific configuration.
167
197
 
@@ -193,10 +223,16 @@ class AsyncBulkClient:
193
223
  _response = await self._client_wrapper.httpx_client.request(
194
224
  f"api/projects/{jsonable_encoder(id)}/members/bulk/",
195
225
  method="POST",
226
+ params={
227
+ "search": search,
228
+ },
196
229
  json={
197
230
  "all": all_,
198
231
  "excluded": excluded,
199
232
  "included": included,
233
+ "roles": convert_and_respect_annotation_metadata(
234
+ object_=roles, annotation=typing.Sequence[ProjectMemberBulkAssignRolesRequest], direction="write"
235
+ ),
200
236
  },
201
237
  headers={
202
238
  "content-type": "application/json",
@@ -218,7 +254,9 @@ class AsyncBulkClient:
218
254
  raise ApiError(status_code=_response.status_code, body=_response.text)
219
255
  raise ApiError(status_code=_response.status_code, body=_response_json)
220
256
 
221
- async def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> BulkDeleteResponse:
257
+ async def delete(
258
+ self, id: int, *, search: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
259
+ ) -> BulkDeleteResponse:
222
260
  """
223
261
  Unassign project members in bulk. Allows the same request body as bulk assign.
224
262
 
@@ -226,6 +264,9 @@ class AsyncBulkClient:
226
264
  ----------
227
265
  id : int
228
266
 
267
+ search : typing.Optional[str]
268
+ Search term for filtering members by name, email, or username. Only when all=True.
269
+
229
270
  request_options : typing.Optional[RequestOptions]
230
271
  Request-specific configuration.
231
272
 
@@ -256,6 +297,9 @@ class AsyncBulkClient:
256
297
  _response = await self._client_wrapper.httpx_client.request(
257
298
  f"api/projects/{jsonable_encoder(id)}/members/bulk/",
258
299
  method="DELETE",
300
+ params={
301
+ "search": search,
302
+ },
259
303
  request_options=request_options,
260
304
  )
261
305
  try:
@@ -2,6 +2,7 @@
2
2
 
3
3
  from ...core.client_wrapper import SyncClientWrapper
4
4
  from .bulk.client import BulkClient
5
+ from .paginated.client import PaginatedClient
5
6
  import typing
6
7
  from ...core.request_options import RequestOptions
7
8
  from ...types.lse_user import LseUser
@@ -11,12 +12,14 @@ from json.decoder import JSONDecodeError
11
12
  from ...core.api_error import ApiError
12
13
  from ...core.client_wrapper import AsyncClientWrapper
13
14
  from .bulk.client import AsyncBulkClient
15
+ from .paginated.client import AsyncPaginatedClient
14
16
 
15
17
 
16
18
  class MembersClient:
17
19
  def __init__(self, *, client_wrapper: SyncClientWrapper):
18
20
  self._client_wrapper = client_wrapper
19
21
  self.bulk = BulkClient(client_wrapper=self._client_wrapper)
22
+ self.paginated = PaginatedClient(client_wrapper=self._client_wrapper)
20
23
 
21
24
  def get(
22
25
  self, id: int, *, user_ids: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
@@ -77,6 +80,7 @@ class AsyncMembersClient:
77
80
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
78
81
  self._client_wrapper = client_wrapper
79
82
  self.bulk = AsyncBulkClient(client_wrapper=self._client_wrapper)
83
+ self.paginated = AsyncPaginatedClient(client_wrapper=self._client_wrapper)
80
84
 
81
85
  async def get(
82
86
  self, id: int, *, user_ids: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,248 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ....core.client_wrapper import SyncClientWrapper
4
+ import typing
5
+ from ....core.request_options import RequestOptions
6
+ from ....core.pagination import SyncPager
7
+ from ....types.paginated_project_member import PaginatedProjectMember
8
+ from ....core.jsonable_encoder import jsonable_encoder
9
+ from ....types.paginated_paginated_project_member_list import PaginatedPaginatedProjectMemberList
10
+ from ....core.unchecked_base_model import construct_type
11
+ from json.decoder import JSONDecodeError
12
+ from ....core.api_error import ApiError
13
+ from ....core.client_wrapper import AsyncClientWrapper
14
+ from ....core.pagination import AsyncPager
15
+
16
+
17
+ class PaginatedClient:
18
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
19
+ self._client_wrapper = client_wrapper
20
+
21
+ def list(
22
+ self,
23
+ id: int,
24
+ *,
25
+ ids: typing.Optional[str] = None,
26
+ implicit: typing.Optional[bool] = None,
27
+ no_annotators: typing.Optional[bool] = None,
28
+ page: typing.Optional[int] = None,
29
+ page_size: typing.Optional[int] = None,
30
+ search: typing.Optional[str] = None,
31
+ with_deleted: typing.Optional[bool] = None,
32
+ request_options: typing.Optional[RequestOptions] = None,
33
+ ) -> SyncPager[PaginatedProjectMember]:
34
+ """
35
+ Retrieve the members for a specific project.
36
+
37
+ Parameters
38
+ ----------
39
+ id : int
40
+
41
+ ids : typing.Optional[str]
42
+ Comma-separated list of user IDs to filter by
43
+
44
+ implicit : typing.Optional[bool]
45
+ Include/Exclude implicit project members in the results. If not provided, explicit + implicit members are returned.
46
+
47
+ no_annotators : typing.Optional[bool]
48
+ Exclude annotators from the results
49
+
50
+ page : typing.Optional[int]
51
+ A page number within the paginated result set.
52
+
53
+ page_size : typing.Optional[int]
54
+ Number of results to return per page.
55
+
56
+ search : typing.Optional[str]
57
+ Search term for filtering members by name, email, or username
58
+
59
+ with_deleted : typing.Optional[bool]
60
+ Include deleted members in the results
61
+
62
+ request_options : typing.Optional[RequestOptions]
63
+ Request-specific configuration.
64
+
65
+ Returns
66
+ -------
67
+ SyncPager[PaginatedProjectMember]
68
+
69
+
70
+ Examples
71
+ --------
72
+ from label_studio_sdk import LabelStudio
73
+
74
+ client = LabelStudio(
75
+ api_key="YOUR_API_KEY",
76
+ )
77
+ response = client.projects.members.paginated.list(
78
+ id=1,
79
+ )
80
+ for item in response:
81
+ yield item
82
+ # alternatively, you can paginate page-by-page
83
+ for page in response.iter_pages():
84
+ yield page
85
+ """
86
+ page = page if page is not None else 1
87
+ _response = self._client_wrapper.httpx_client.request(
88
+ f"api/projects/{jsonable_encoder(id)}/members/paginated/",
89
+ method="GET",
90
+ params={
91
+ "ids": ids,
92
+ "implicit": implicit,
93
+ "no_annotators": no_annotators,
94
+ "page": page,
95
+ "page_size": page_size,
96
+ "search": search,
97
+ "with_deleted": with_deleted,
98
+ },
99
+ request_options=request_options,
100
+ )
101
+ try:
102
+ if 200 <= _response.status_code < 300:
103
+ _parsed_response = typing.cast(
104
+ PaginatedPaginatedProjectMemberList,
105
+ construct_type(
106
+ type_=PaginatedPaginatedProjectMemberList, # type: ignore
107
+ object_=_response.json(),
108
+ ),
109
+ )
110
+ _has_next = True
111
+ _get_next = lambda: self.list(
112
+ id,
113
+ ids=ids,
114
+ implicit=implicit,
115
+ no_annotators=no_annotators,
116
+ page=page + 1,
117
+ page_size=page_size,
118
+ search=search,
119
+ with_deleted=with_deleted,
120
+ request_options=request_options,
121
+ )
122
+ _items = _parsed_response.results
123
+ return SyncPager(has_next=_has_next, items=_items, get_next=_get_next)
124
+ _response_json = _response.json()
125
+ except JSONDecodeError:
126
+ raise ApiError(status_code=_response.status_code, body=_response.text)
127
+ raise ApiError(status_code=_response.status_code, body=_response_json)
128
+
129
+
130
+ class AsyncPaginatedClient:
131
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
132
+ self._client_wrapper = client_wrapper
133
+
134
+ async def list(
135
+ self,
136
+ id: int,
137
+ *,
138
+ ids: typing.Optional[str] = None,
139
+ implicit: typing.Optional[bool] = None,
140
+ no_annotators: typing.Optional[bool] = None,
141
+ page: typing.Optional[int] = None,
142
+ page_size: typing.Optional[int] = None,
143
+ search: typing.Optional[str] = None,
144
+ with_deleted: typing.Optional[bool] = None,
145
+ request_options: typing.Optional[RequestOptions] = None,
146
+ ) -> AsyncPager[PaginatedProjectMember]:
147
+ """
148
+ Retrieve the members for a specific project.
149
+
150
+ Parameters
151
+ ----------
152
+ id : int
153
+
154
+ ids : typing.Optional[str]
155
+ Comma-separated list of user IDs to filter by
156
+
157
+ implicit : typing.Optional[bool]
158
+ Include/Exclude implicit project members in the results. If not provided, explicit + implicit members are returned.
159
+
160
+ no_annotators : typing.Optional[bool]
161
+ Exclude annotators from the results
162
+
163
+ page : typing.Optional[int]
164
+ A page number within the paginated result set.
165
+
166
+ page_size : typing.Optional[int]
167
+ Number of results to return per page.
168
+
169
+ search : typing.Optional[str]
170
+ Search term for filtering members by name, email, or username
171
+
172
+ with_deleted : typing.Optional[bool]
173
+ Include deleted members in the results
174
+
175
+ request_options : typing.Optional[RequestOptions]
176
+ Request-specific configuration.
177
+
178
+ Returns
179
+ -------
180
+ AsyncPager[PaginatedProjectMember]
181
+
182
+
183
+ Examples
184
+ --------
185
+ import asyncio
186
+
187
+ from label_studio_sdk import AsyncLabelStudio
188
+
189
+ client = AsyncLabelStudio(
190
+ api_key="YOUR_API_KEY",
191
+ )
192
+
193
+
194
+ async def main() -> None:
195
+ response = await client.projects.members.paginated.list(
196
+ id=1,
197
+ )
198
+ async for item in response:
199
+ yield item
200
+ # alternatively, you can paginate page-by-page
201
+ async for page in response.iter_pages():
202
+ yield page
203
+
204
+
205
+ asyncio.run(main())
206
+ """
207
+ page = page if page is not None else 1
208
+ _response = await self._client_wrapper.httpx_client.request(
209
+ f"api/projects/{jsonable_encoder(id)}/members/paginated/",
210
+ method="GET",
211
+ params={
212
+ "ids": ids,
213
+ "implicit": implicit,
214
+ "no_annotators": no_annotators,
215
+ "page": page,
216
+ "page_size": page_size,
217
+ "search": search,
218
+ "with_deleted": with_deleted,
219
+ },
220
+ request_options=request_options,
221
+ )
222
+ try:
223
+ if 200 <= _response.status_code < 300:
224
+ _parsed_response = typing.cast(
225
+ PaginatedPaginatedProjectMemberList,
226
+ construct_type(
227
+ type_=PaginatedPaginatedProjectMemberList, # type: ignore
228
+ object_=_response.json(),
229
+ ),
230
+ )
231
+ _has_next = True
232
+ _get_next = lambda: self.list(
233
+ id,
234
+ ids=ids,
235
+ implicit=implicit,
236
+ no_annotators=no_annotators,
237
+ page=page + 1,
238
+ page_size=page_size,
239
+ search=search,
240
+ with_deleted=with_deleted,
241
+ request_options=request_options,
242
+ )
243
+ _items = _parsed_response.results
244
+ return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next)
245
+ _response_json = _response.json()
246
+ except JSONDecodeError:
247
+ raise ApiError(status_code=_response.status_code, body=_response.text)
248
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+