benchling-sdk 1.6.0a28__py3-none-any.whl → 1.7.0a0__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.
- benchling_sdk/services/v2/beta/v2_beta_app_service.py +65 -1
- benchling_sdk/services/v2/stable/container_service.py +41 -0
- {benchling_sdk-1.6.0a28.dist-info → benchling_sdk-1.7.0a0.dist-info}/METADATA +2 -2
- {benchling_sdk-1.6.0a28.dist-info → benchling_sdk-1.7.0a0.dist-info}/RECORD +6 -6
- {benchling_sdk-1.6.0a28.dist-info → benchling_sdk-1.7.0a0.dist-info}/LICENSE +0 -0
- {benchling_sdk-1.6.0a28.dist-info → benchling_sdk-1.7.0a0.dist-info}/WHEEL +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Iterable, List, Optional
|
1
|
+
from typing import Iterable, List, Optional, Union
|
2
2
|
|
3
3
|
from benchling_api_client.v2.beta.api.apps import (
|
4
4
|
archive_canvases,
|
@@ -8,6 +8,7 @@ from benchling_api_client.v2.beta.api.apps import (
|
|
8
8
|
get_benchling_app_manifest,
|
9
9
|
get_canvas,
|
10
10
|
get_session_by_id,
|
11
|
+
list_canvases,
|
11
12
|
list_sessions,
|
12
13
|
put_benchling_app_manifest,
|
13
14
|
unarchive_canvases,
|
@@ -22,7 +23,10 @@ from benchling_api_client.v2.beta.models.canvas_update import CanvasUpdate
|
|
22
23
|
from benchling_api_client.v2.beta.models.canvases_archival_change import CanvasesArchivalChange
|
23
24
|
from benchling_api_client.v2.beta.models.canvases_archive import CanvasesArchive
|
24
25
|
from benchling_api_client.v2.beta.models.canvases_archive_reason import CanvasesArchiveReason
|
26
|
+
from benchling_api_client.v2.beta.models.canvases_paginated_list import CanvasesPaginatedList
|
25
27
|
from benchling_api_client.v2.beta.models.canvases_unarchive import CanvasesUnarchive
|
28
|
+
from benchling_api_client.v2.beta.models.list_canvases_enabled import ListCanvasesEnabled
|
29
|
+
from benchling_api_client.v2.beta.models.list_canvases_sort import ListCanvasesSort
|
26
30
|
from benchling_api_client.v2.beta.models.session import Session
|
27
31
|
from benchling_api_client.v2.beta.models.session_create import SessionCreate
|
28
32
|
from benchling_api_client.v2.beta.models.session_update import SessionUpdate
|
@@ -30,6 +34,7 @@ from benchling_api_client.v2.beta.models.sessions_paginated_list import Sessions
|
|
30
34
|
from benchling_api_client.v2.stable.types import Response
|
31
35
|
|
32
36
|
from benchling_sdk.errors import AppSessionClosedError, raise_for_status
|
37
|
+
from benchling_sdk.helpers.constants import _translate_to_string_enum
|
33
38
|
from benchling_sdk.helpers.decorators import api_method
|
34
39
|
from benchling_sdk.helpers.logging_helpers import log_deprecation
|
35
40
|
from benchling_sdk.helpers.pagination_helpers import NextToken, PageIterator
|
@@ -95,6 +100,65 @@ class V2BetaAppService(BaseService):
|
|
95
100
|
)
|
96
101
|
return model_from_detailed(response)
|
97
102
|
|
103
|
+
@api_method
|
104
|
+
def _canvases_page(
|
105
|
+
self,
|
106
|
+
app_id: Optional[str] = None,
|
107
|
+
feature_id: Optional[str] = None,
|
108
|
+
resource_id: Optional[str] = None,
|
109
|
+
enabled: Optional[ListCanvasesEnabled] = None,
|
110
|
+
archive_reason: Optional[str] = None,
|
111
|
+
sort: Optional[Union[str, ListCanvasesSort]] = None,
|
112
|
+
next_token: NextToken = None,
|
113
|
+
page_size: Optional[int] = None,
|
114
|
+
) -> Response[CanvasesPaginatedList]:
|
115
|
+
response = list_canvases.sync_detailed(
|
116
|
+
client=self.client,
|
117
|
+
app_id=none_as_unset(app_id),
|
118
|
+
feature_id=none_as_unset(feature_id),
|
119
|
+
resource_id=none_as_unset(resource_id),
|
120
|
+
enabled=none_as_unset(enabled),
|
121
|
+
archive_reason=none_as_unset(archive_reason),
|
122
|
+
sort=none_as_unset(_translate_to_string_enum(ListCanvasesSort, sort)),
|
123
|
+
next_token=none_as_unset(next_token),
|
124
|
+
page_size=none_as_unset(page_size),
|
125
|
+
)
|
126
|
+
raise_for_status(response)
|
127
|
+
return response # type: ignore
|
128
|
+
|
129
|
+
def list_canvases(
|
130
|
+
self,
|
131
|
+
app_id: Optional[str] = None,
|
132
|
+
feature_id: Optional[str] = None,
|
133
|
+
resource_id: Optional[str] = None,
|
134
|
+
enabled: Optional[ListCanvasesEnabled] = None,
|
135
|
+
archive_reason: Optional[str] = None,
|
136
|
+
sort: Optional[Union[str, ListCanvasesSort]] = None,
|
137
|
+
page_size: Optional[int] = None,
|
138
|
+
) -> PageIterator[Session]:
|
139
|
+
"""
|
140
|
+
List canvases.
|
141
|
+
|
142
|
+
See https://benchling.com/api/v2-beta/reference?availability=not-available#/Apps/listCanvases
|
143
|
+
"""
|
144
|
+
|
145
|
+
def api_call(next_token: NextToken) -> Response[CanvasesPaginatedList]:
|
146
|
+
return self._canvases_page(
|
147
|
+
app_id=app_id,
|
148
|
+
feature_id=feature_id,
|
149
|
+
resource_id=resource_id,
|
150
|
+
enabled=enabled,
|
151
|
+
archive_reason=archive_reason,
|
152
|
+
sort=sort,
|
153
|
+
next_token=next_token,
|
154
|
+
page_size=page_size,
|
155
|
+
)
|
156
|
+
|
157
|
+
def results_extractor(body: CanvasesPaginatedList) -> Optional[List[Canvas]]:
|
158
|
+
return body.canvases
|
159
|
+
|
160
|
+
return PageIterator(api_call, results_extractor)
|
161
|
+
|
98
162
|
@api_method
|
99
163
|
def get_canvas(self, canvas_id: str) -> Canvas:
|
100
164
|
"""
|
@@ -58,6 +58,7 @@ from benchling_sdk.models import (
|
|
58
58
|
MultipleContainersTransfer,
|
59
59
|
MultipleContainersTransfersList,
|
60
60
|
PrintLabels,
|
61
|
+
SampleRestrictionStatus,
|
61
62
|
)
|
62
63
|
from benchling_sdk.services.v2.base_service import BaseService
|
63
64
|
|
@@ -108,6 +109,14 @@ class ContainerService(BaseService):
|
|
108
109
|
names_any_of: Optional[Iterable[str]] = None,
|
109
110
|
names_any_of_case_sensitive: Optional[Iterable[str]] = None,
|
110
111
|
creator_ids: Optional[Iterable[str]] = None,
|
112
|
+
checkout_assignee_ids_any_of: Optional[Iterable[str]] = None,
|
113
|
+
restricted_sample_party_ids_all_of: Optional[Iterable[str]] = None,
|
114
|
+
restricted_sample_party_ids_any_of: Optional[Iterable[str]] = None,
|
115
|
+
restricted_sample_party_ids_none_of: Optional[Iterable[str]] = None,
|
116
|
+
restriction_status: Optional[SampleRestrictionStatus] = None,
|
117
|
+
sample_owner_ids_all_of: Optional[Iterable[str]] = None,
|
118
|
+
sample_owner_ids_any_of: Optional[Iterable[str]] = None,
|
119
|
+
sample_owner_ids_none_of: Optional[Iterable[str]] = None,
|
111
120
|
archive_reason: Optional[str] = None,
|
112
121
|
schema_fields: Optional[Dict[str, Any]] = None,
|
113
122
|
) -> Response[ContainersPaginatedList]:
|
@@ -127,6 +136,22 @@ class ContainerService(BaseService):
|
|
127
136
|
namesany_of=none_as_unset(optional_array_query_param(names_any_of)),
|
128
137
|
namesany_ofcase_sensitive=none_as_unset(optional_array_query_param(names_any_of_case_sensitive)),
|
129
138
|
creator_ids=none_as_unset(optional_array_query_param(creator_ids)),
|
139
|
+
checkout_assignee_idsany_of=none_as_unset(
|
140
|
+
optional_array_query_param(checkout_assignee_ids_any_of)
|
141
|
+
),
|
142
|
+
restricted_sample_party_idsall_of=none_as_unset(
|
143
|
+
optional_array_query_param(restricted_sample_party_ids_all_of)
|
144
|
+
),
|
145
|
+
restricted_sample_party_idsany_of=none_as_unset(
|
146
|
+
optional_array_query_param(restricted_sample_party_ids_any_of)
|
147
|
+
),
|
148
|
+
restricted_sample_party_idsnone_of=none_as_unset(
|
149
|
+
optional_array_query_param(restricted_sample_party_ids_none_of)
|
150
|
+
),
|
151
|
+
restriction_status=none_as_unset(restriction_status),
|
152
|
+
sample_owner_idsall_of=none_as_unset(optional_array_query_param(sample_owner_ids_all_of)),
|
153
|
+
sample_owner_idsany_of=none_as_unset(optional_array_query_param(sample_owner_ids_any_of)),
|
154
|
+
sample_owner_idsnone_of=none_as_unset(optional_array_query_param(sample_owner_ids_none_of)),
|
130
155
|
archive_reason=none_as_unset(archive_reason),
|
131
156
|
schema_fields=none_as_unset(schema_fields_query_param(schema_fields)),
|
132
157
|
next_token=none_as_unset(next_token),
|
@@ -152,6 +177,14 @@ class ContainerService(BaseService):
|
|
152
177
|
names_any_of: Optional[Iterable[str]] = None,
|
153
178
|
names_any_of_case_sensitive: Optional[Iterable[str]] = None,
|
154
179
|
creator_ids: Optional[Iterable[str]] = None,
|
180
|
+
checkout_assignee_ids_any_of: Optional[Iterable[str]] = None,
|
181
|
+
restricted_sample_party_ids_all_of: Optional[Iterable[str]] = None,
|
182
|
+
restricted_sample_party_ids_any_of: Optional[Iterable[str]] = None,
|
183
|
+
restricted_sample_party_ids_none_of: Optional[Iterable[str]] = None,
|
184
|
+
restriction_status: Optional[SampleRestrictionStatus] = None,
|
185
|
+
sample_owner_ids_all_of: Optional[Iterable[str]] = None,
|
186
|
+
sample_owner_ids_any_of: Optional[Iterable[str]] = None,
|
187
|
+
sample_owner_ids_none_of: Optional[Iterable[str]] = None,
|
155
188
|
archive_reason: Optional[str] = None,
|
156
189
|
schema_fields: Optional[Dict[str, Any]] = None,
|
157
190
|
page_size: Optional[int] = None,
|
@@ -179,6 +212,14 @@ class ContainerService(BaseService):
|
|
179
212
|
names_any_of=names_any_of,
|
180
213
|
names_any_of_case_sensitive=names_any_of_case_sensitive,
|
181
214
|
creator_ids=creator_ids,
|
215
|
+
checkout_assignee_ids_any_of=checkout_assignee_ids_any_of,
|
216
|
+
restricted_sample_party_ids_all_of=restricted_sample_party_ids_all_of,
|
217
|
+
restricted_sample_party_ids_any_of=restricted_sample_party_ids_any_of,
|
218
|
+
restricted_sample_party_ids_none_of=restricted_sample_party_ids_none_of,
|
219
|
+
restriction_status=restriction_status,
|
220
|
+
sample_owner_ids_all_of=sample_owner_ids_all_of,
|
221
|
+
sample_owner_ids_any_of=sample_owner_ids_any_of,
|
222
|
+
sample_owner_ids_none_of=sample_owner_ids_none_of,
|
182
223
|
archive_reason=archive_reason,
|
183
224
|
next_token=next_token,
|
184
225
|
schema_fields=schema_fields,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: benchling-sdk
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.7.0a0
|
4
4
|
Summary: SDK for interacting with the Benchling Platform.
|
5
5
|
License: Apache-2.0
|
6
6
|
Author: Benchling Support
|
@@ -18,7 +18,7 @@ Provides-Extra: python-jose
|
|
18
18
|
Requires-Dist: PyYAML (>=6.0,<7.0)
|
19
19
|
Requires-Dist: attrs (>=20.1.0,<23)
|
20
20
|
Requires-Dist: backoff (>=1.10.0,<2.0.0)
|
21
|
-
Requires-Dist: benchling-api-client (==2.0.
|
21
|
+
Requires-Dist: benchling-api-client (==2.0.109)
|
22
22
|
Requires-Dist: certifi (>=2022.12.7)
|
23
23
|
Requires-Dist: cryptography (>=38.0.3,<39.0.0); extra == "cryptography"
|
24
24
|
Requires-Dist: dataclasses-json (>=0.5.2,<0.6.0)
|
@@ -42,7 +42,7 @@ benchling_sdk/services/v2/alpha/v2_alpha_dna_sequence_service.py,sha256=XzpaPWbd
|
|
42
42
|
benchling_sdk/services/v2/base_service.py,sha256=g4Qn001slCJTvqDvRmbImJNBJ8lPJgMVL1H4Xxc8D2o,951
|
43
43
|
benchling_sdk/services/v2/beta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
44
44
|
benchling_sdk/services/v2/beta/v2_beta_aa_sequence_service.py,sha256=Y7E56Z8Piuucd1UQiN6yM1vbQAY7T8x3fZy62RaNRbk,2551
|
45
|
-
benchling_sdk/services/v2/beta/v2_beta_app_service.py,sha256=
|
45
|
+
benchling_sdk/services/v2/beta/v2_beta_app_service.py,sha256=qN--tI3MIzkEI-QKo1vzNtIlSt5ljh50ttl_KfWuvAE,11210
|
46
46
|
benchling_sdk/services/v2/beta/v2_beta_custom_entity_service.py,sha256=qpKQ8X_oiyDv_KIEeD9eTo6kGU9hkNlUqqjAdMZQPiM,1840
|
47
47
|
benchling_sdk/services/v2/beta/v2_beta_dna_oligo_service.py,sha256=s2XZMItVJjJp3lZZ7YLh1GbV_cdIKLPOVqglKcAWMNg,1704
|
48
48
|
benchling_sdk/services/v2/beta/v2_beta_dna_sequence_service.py,sha256=wLN9lTF-faBrofQHlw3uKilaQvdOgSDI2oFa1GeuViY,1843
|
@@ -58,7 +58,7 @@ benchling_sdk/services/v2/stable/assay_result_service.py,sha256=yY4eX60hfVcm3emr
|
|
58
58
|
benchling_sdk/services/v2/stable/assay_run_service.py,sha256=tLpG1pAztEoaDatqlgYlRZ_LgwDly1_UeWt4G4UXvd4,9023
|
59
59
|
benchling_sdk/services/v2/stable/blob_service.py,sha256=vmFHyVcs2Q0w_R1D5Ips6fKIKgYL8ULk4wMn1cy6zTE,16738
|
60
60
|
benchling_sdk/services/v2/stable/box_service.py,sha256=uN8eUEBj1v0_OFD8arcuwlF9VzQ7Z403Trhg-30wYt8,12144
|
61
|
-
benchling_sdk/services/v2/stable/container_service.py,sha256=
|
61
|
+
benchling_sdk/services/v2/stable/container_service.py,sha256=mYFoiYuA7-9kqaZiThUDgnfc7o7Jy5ggZDErTVlZvLI,18055
|
62
62
|
benchling_sdk/services/v2/stable/custom_entity_service.py,sha256=VzdhssPyjq6amSDcZ65f2Bvwej1WqLtrNUtufB9xL9g,10828
|
63
63
|
benchling_sdk/services/v2/stable/dna_alignments_service.py,sha256=leJaPt7Uk1PyxfO9LXTVi2DjLyqcXgeMselftJaGJA4,7445
|
64
64
|
benchling_sdk/services/v2/stable/dna_oligo_service.py,sha256=5_djJnusHMKk3tIW14QkSYVIv2zlUE-kOAIWRjpSsUw,9456
|
@@ -97,7 +97,7 @@ benchling_sdk/services/v2/v2_alpha_service.py,sha256=IVjONY9kCbUP6IC4nci7vh8ivjE
|
|
97
97
|
benchling_sdk/services/v2/v2_beta_service.py,sha256=znmjF4k5eJiMfcu-7X_a9JmV8DdToBDNoO5M4A7Qw2w,6483
|
98
98
|
benchling_sdk/services/v2/v2_stable_service.py,sha256=Xb4C2SJ1Qwxg1UOqvGRbw5gU5THRMyHDDAFqEaNavIU,25286
|
99
99
|
benchling_sdk/services/v2_service.py,sha256=RB0jzyOVXogQTDdKl5IR2IYzz4onBKFtoXzYeVAKTIM,2179
|
100
|
-
benchling_sdk-1.
|
101
|
-
benchling_sdk-1.
|
102
|
-
benchling_sdk-1.
|
103
|
-
benchling_sdk-1.
|
100
|
+
benchling_sdk-1.7.0a0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
101
|
+
benchling_sdk-1.7.0a0.dist-info/WHEEL,sha256=vxFmldFsRN_Hx10GDvsdv1wroKq8r5Lzvjp6GZ4OO8c,88
|
102
|
+
benchling_sdk-1.7.0a0.dist-info/METADATA,sha256=5vIcbsqEoqu-NW5F0JK_VLUGR5R9v0PgsRVlhCyIVxw,2220
|
103
|
+
benchling_sdk-1.7.0a0.dist-info/RECORD,,
|
File without changes
|
File without changes
|