benchling-sdk 1.21.2__py3-none-any.whl → 1.22.0a1__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/apps/canvas/types.py +8 -0
- benchling_sdk/benchling.py +88 -12
- benchling_sdk/helpers/task_helpers.py +5 -5
- benchling_sdk/models/__init__.py +1335 -329
- benchling_sdk/models/webhooks/v0/__init__.py +24 -4
- benchling_sdk/services/v2/stable/aa_sequence_service.py +4 -0
- benchling_sdk/services/v2/{beta/v2_beta_audit_service.py → stable/audit_service.py} +6 -6
- benchling_sdk/services/v2/stable/box_service.py +4 -0
- benchling_sdk/services/v2/stable/connect_service.py +79 -0
- benchling_sdk/services/v2/stable/container_service.py +4 -0
- benchling_sdk/services/v2/stable/custom_entity_service.py +4 -0
- benchling_sdk/services/v2/stable/data_frame_service.py +323 -0
- benchling_sdk/services/v2/stable/dataset_service.py +192 -0
- benchling_sdk/services/v2/stable/dna_oligo_service.py +4 -0
- benchling_sdk/services/v2/stable/dna_sequence_service.py +4 -0
- benchling_sdk/services/v2/stable/file_service.py +191 -0
- benchling_sdk/services/v2/stable/{request_service.py → legacy_request_service.py} +25 -25
- benchling_sdk/services/v2/stable/location_service.py +4 -0
- benchling_sdk/services/v2/stable/mixture_service.py +4 -0
- benchling_sdk/services/v2/stable/molecule_service.py +4 -0
- benchling_sdk/services/v2/stable/nucleotide_alignments_service.py +4 -0
- benchling_sdk/services/v2/stable/plate_service.py +4 -0
- benchling_sdk/services/v2/stable/rna_oligo_service.py +4 -0
- benchling_sdk/services/v2/stable/rna_sequence_service.py +4 -0
- benchling_sdk/services/v2/stable/task_service.py +1 -7
- benchling_sdk/services/v2/stable/test_order_service.py +145 -0
- benchling_sdk/services/v2/v2_beta_service.py +0 -14
- benchling_sdk/services/v2/v2_stable_service.py +101 -14
- {benchling_sdk-1.21.2.dist-info → benchling_sdk-1.22.0a1.dist-info}/METADATA +3 -2
- {benchling_sdk-1.21.2.dist-info → benchling_sdk-1.22.0a1.dist-info}/RECORD +32 -27
- {benchling_sdk-1.21.2.dist-info → benchling_sdk-1.22.0a1.dist-info}/LICENSE +0 -0
- {benchling_sdk-1.21.2.dist-info → benchling_sdk-1.22.0a1.dist-info}/WHEEL +0 -0
@@ -15,6 +15,9 @@ from benchling_sdk.models import (
|
|
15
15
|
DropdownUiBlock,
|
16
16
|
DropdownUiBlockCreate,
|
17
17
|
DropdownUiBlockUpdate,
|
18
|
+
FileUploadUiBlock,
|
19
|
+
FileUploadUiBlockCreate,
|
20
|
+
FileUploadUiBlockUpdate,
|
18
21
|
MarkdownUiBlock,
|
19
22
|
MarkdownUiBlockCreate,
|
20
23
|
MarkdownUiBlockUpdate,
|
@@ -46,6 +49,7 @@ UiBlock = Union[
|
|
46
49
|
ChipUiBlock,
|
47
50
|
DropdownMultiValueUiBlock,
|
48
51
|
DropdownUiBlock,
|
52
|
+
FileUploadUiBlock,
|
49
53
|
MarkdownUiBlock,
|
50
54
|
SearchInputMultiValueUiBlock,
|
51
55
|
SearchInputUiBlock,
|
@@ -67,6 +71,7 @@ _UiBlockCreate = Union[
|
|
67
71
|
ChipUiBlockCreate,
|
68
72
|
DropdownMultiValueUiBlockCreate,
|
69
73
|
DropdownUiBlockCreate,
|
74
|
+
FileUploadUiBlockCreate,
|
70
75
|
MarkdownUiBlockCreate,
|
71
76
|
SearchInputMultiValueUiBlockCreate,
|
72
77
|
SearchInputUiBlockCreate,
|
@@ -83,6 +88,7 @@ _UiBlockUpdate = Union[
|
|
83
88
|
ChipUiBlockUpdate,
|
84
89
|
DropdownMultiValueUiBlockUpdate,
|
85
90
|
DropdownUiBlockUpdate,
|
91
|
+
FileUploadUiBlockUpdate,
|
86
92
|
MarkdownUiBlockUpdate,
|
87
93
|
SearchInputMultiValueUiBlockUpdate,
|
88
94
|
SearchInputUiBlockUpdate,
|
@@ -99,6 +105,7 @@ _UI_BLOCK_MAPPINGS_CREATE = {
|
|
99
105
|
ChipUiBlock: ChipUiBlockCreate,
|
100
106
|
DropdownMultiValueUiBlock: DropdownMultiValueUiBlockCreate,
|
101
107
|
DropdownUiBlock: DropdownUiBlockCreate,
|
108
|
+
FileUploadUiBlock: FileUploadUiBlockCreate,
|
102
109
|
MarkdownUiBlock: MarkdownUiBlockCreate,
|
103
110
|
SearchInputMultiValueUiBlock: SearchInputMultiValueUiBlockCreate,
|
104
111
|
SearchInputUiBlock: SearchInputUiBlockCreate,
|
@@ -114,6 +121,7 @@ _UI_BLOCK_MAPPINGS_UPDATE = {
|
|
114
121
|
ChipUiBlock: ChipUiBlockUpdate,
|
115
122
|
DropdownMultiValueUiBlock: DropdownMultiValueUiBlockUpdate,
|
116
123
|
DropdownUiBlock: DropdownUiBlockUpdate,
|
124
|
+
FileUploadUiBlock: FileUploadUiBlockUpdate,
|
117
125
|
MarkdownUiBlock: MarkdownUiBlockUpdate,
|
118
126
|
SearchInputMultiValueUiBlock: SearchInputMultiValueUiBlockUpdate,
|
119
127
|
SearchInputUiBlock: SearchInputUiBlockUpdate,
|
benchling_sdk/benchling.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
"""Provides the Benchling class, which is the main interface for accessing Benchling's API functionality."""
|
2
|
+
|
2
3
|
from __future__ import annotations
|
3
4
|
|
4
5
|
from functools import cached_property
|
@@ -18,12 +19,16 @@ if TYPE_CHECKING:
|
|
18
19
|
from benchling_sdk.services.v2.stable.app_service import AppService
|
19
20
|
from benchling_sdk.services.v2.stable.assay_result_service import AssayResultService
|
20
21
|
from benchling_sdk.services.v2.stable.assay_run_service import AssayRunService
|
22
|
+
from benchling_sdk.services.v2.stable.audit_service import AuditService
|
21
23
|
from benchling_sdk.services.v2.stable.blob_service import BlobService
|
22
24
|
from benchling_sdk.services.v2.stable.box_service import BoxService
|
23
25
|
from benchling_sdk.services.v2.stable.codon_usage_table_service import CodonUsageTableService
|
26
|
+
from benchling_sdk.services.v2.stable.connect_service import ConnectService
|
24
27
|
from benchling_sdk.services.v2.stable.container_service import ContainerService
|
25
28
|
from benchling_sdk.services.v2.stable.custom_entity_service import CustomEntityService
|
26
29
|
from benchling_sdk.services.v2.stable.custom_notation_service import CustomNotationService
|
30
|
+
from benchling_sdk.services.v2.stable.data_frame_service import DataFrameService
|
31
|
+
from benchling_sdk.services.v2.stable.dataset_service import DatasetService
|
27
32
|
from benchling_sdk.services.v2.stable.dna_alignments_service import DnaAlignmentsService
|
28
33
|
from benchling_sdk.services.v2.stable.dna_oligo_service import DnaOligoService
|
29
34
|
from benchling_sdk.services.v2.stable.dna_sequence_service import DnaSequenceService
|
@@ -34,11 +39,13 @@ if TYPE_CHECKING:
|
|
34
39
|
from benchling_sdk.services.v2.stable.event_service import EventService
|
35
40
|
from benchling_sdk.services.v2.stable.export_service import ExportService
|
36
41
|
from benchling_sdk.services.v2.stable.feature_library_service import FeatureLibraryService
|
42
|
+
from benchling_sdk.services.v2.stable.file_service import FileService
|
37
43
|
from benchling_sdk.services.v2.stable.folder_service import FolderService
|
38
44
|
from benchling_sdk.services.v2.stable.instrument_query_service import InstrumentQueryService
|
39
45
|
from benchling_sdk.services.v2.stable.inventory_service import InventoryService
|
40
46
|
from benchling_sdk.services.v2.stable.lab_automation_service import LabAutomationService
|
41
47
|
from benchling_sdk.services.v2.stable.label_template_service import LabelTemplateService
|
48
|
+
from benchling_sdk.services.v2.stable.legacy_request_service import LegacyRequestService
|
42
49
|
from benchling_sdk.services.v2.stable.location_service import LocationService
|
43
50
|
from benchling_sdk.services.v2.stable.mixture_service import MixtureService
|
44
51
|
from benchling_sdk.services.v2.stable.molecule_service import MoleculeService
|
@@ -50,12 +57,12 @@ if TYPE_CHECKING:
|
|
50
57
|
from benchling_sdk.services.v2.stable.printer_service import PrinterService
|
51
58
|
from benchling_sdk.services.v2.stable.project_service import ProjectService
|
52
59
|
from benchling_sdk.services.v2.stable.registry_service import RegistryService
|
53
|
-
from benchling_sdk.services.v2.stable.request_service import RequestService
|
54
60
|
from benchling_sdk.services.v2.stable.rna_oligo_service import RnaOligoService
|
55
61
|
from benchling_sdk.services.v2.stable.rna_sequence_service import RnaSequenceService
|
56
62
|
from benchling_sdk.services.v2.stable.schema_service import SchemaService
|
57
63
|
from benchling_sdk.services.v2.stable.task_service import TaskService
|
58
64
|
from benchling_sdk.services.v2.stable.team_service import TeamService
|
65
|
+
from benchling_sdk.services.v2.stable.test_order_service import TestOrderService
|
59
66
|
from benchling_sdk.services.v2.stable.user_service import UserService
|
60
67
|
from benchling_sdk.services.v2.stable.warehouse_service import WarehouseService
|
61
68
|
from benchling_sdk.services.v2.stable.workflow_flowchart_config_version_service import (
|
@@ -239,6 +246,17 @@ class Benchling:
|
|
239
246
|
"""
|
240
247
|
return self.v2.stable.assay_runs
|
241
248
|
|
249
|
+
@property
|
250
|
+
def audit(self) -> AuditService:
|
251
|
+
"""
|
252
|
+
Audits.
|
253
|
+
|
254
|
+
Export audit log data for Benchling objects.
|
255
|
+
|
256
|
+
https://benchling.com/api/reference#/Audit
|
257
|
+
"""
|
258
|
+
return self.v2.stable.audit
|
259
|
+
|
242
260
|
@property
|
243
261
|
def blobs(self) -> BlobService:
|
244
262
|
"""
|
@@ -281,6 +299,17 @@ class Benchling:
|
|
281
299
|
"""
|
282
300
|
return self.v2.stable.codon_usage_tables
|
283
301
|
|
302
|
+
@property
|
303
|
+
def connect(self) -> ConnectService:
|
304
|
+
"""
|
305
|
+
Connect.
|
306
|
+
|
307
|
+
Connect endpoints support Benchling Connect actions, like instrument data conversion.
|
308
|
+
|
309
|
+
See https://benchling.com/api/reference#/Connect
|
310
|
+
"""
|
311
|
+
return self.v2.stable.connect
|
312
|
+
|
284
313
|
@property
|
285
314
|
def containers(self) -> ContainerService:
|
286
315
|
"""
|
@@ -323,6 +352,29 @@ class Benchling:
|
|
323
352
|
"""
|
324
353
|
return self.v2.stable.custom_notations
|
325
354
|
|
355
|
+
@property
|
356
|
+
def data_frames(self) -> DataFrameService:
|
357
|
+
"""
|
358
|
+
DataFrames.
|
359
|
+
|
360
|
+
DataFrames are Benchling objects that represent tabular data with typed columns and rows of data.
|
361
|
+
|
362
|
+
See https://benchling.com/api/v2/reference#/Data%20Frames
|
363
|
+
"""
|
364
|
+
return self.v2.stable.data_frames
|
365
|
+
|
366
|
+
@property
|
367
|
+
def datasets(self) -> DatasetService:
|
368
|
+
"""
|
369
|
+
Datasets.
|
370
|
+
|
371
|
+
Datasets are Benchling objects that represent tabular data with typed columns and rows of data. Unlike
|
372
|
+
Data Frames, Datasets are located in folders and can be searched in the UI.
|
373
|
+
|
374
|
+
See https://benchling.com/api/v2/reference#/Datasets
|
375
|
+
"""
|
376
|
+
return self.v2.stable.datasets
|
377
|
+
|
326
378
|
@property
|
327
379
|
def dna_alignments(self) -> DnaAlignmentsService:
|
328
380
|
"""
|
@@ -451,6 +503,19 @@ class Benchling:
|
|
451
503
|
"""
|
452
504
|
return self.v2.stable.feature_libraries
|
453
505
|
|
506
|
+
@property
|
507
|
+
def files(self) -> FileService:
|
508
|
+
"""
|
509
|
+
Files.
|
510
|
+
|
511
|
+
Files are Benchling objects that represent files and their metadata. Compared to Blobs, which are used
|
512
|
+
by most Benchling products for attachments, Files are primarily used in the Analysis and Connect
|
513
|
+
product.
|
514
|
+
|
515
|
+
See https://benchling.com/api/v2/reference#/Files
|
516
|
+
"""
|
517
|
+
return self.v2.stable.files
|
518
|
+
|
454
519
|
@property
|
455
520
|
def folders(self) -> FolderService:
|
456
521
|
"""
|
@@ -507,6 +572,17 @@ class Benchling:
|
|
507
572
|
"""
|
508
573
|
return self.v2.stable.label_templates
|
509
574
|
|
575
|
+
@property
|
576
|
+
def legacy_requests(self) -> LegacyRequestService:
|
577
|
+
"""
|
578
|
+
Legacy Requests.
|
579
|
+
|
580
|
+
Legacy Requests allow scientists and teams to collaborate around experimental assays and workflows.
|
581
|
+
|
582
|
+
See https://benchling.com/api/reference#/Legacy%20Requests
|
583
|
+
"""
|
584
|
+
return self.v2.stable.legacy_requests
|
585
|
+
|
510
586
|
@property
|
511
587
|
def locations(self) -> LocationService:
|
512
588
|
"""
|
@@ -642,17 +718,6 @@ class Benchling:
|
|
642
718
|
"""
|
643
719
|
return self.v2.stable.registry
|
644
720
|
|
645
|
-
@property
|
646
|
-
def requests(self) -> RequestService:
|
647
|
-
"""
|
648
|
-
Requests.
|
649
|
-
|
650
|
-
Requests allow scientists and teams to collaborate around experimental assays and workflows.
|
651
|
-
|
652
|
-
See https://benchling.com/api/reference#/Requests
|
653
|
-
"""
|
654
|
-
return self.v2.stable.requests
|
655
|
-
|
656
721
|
@property
|
657
722
|
def rna_oligos(self) -> RnaOligoService:
|
658
723
|
"""
|
@@ -706,6 +771,17 @@ class Benchling:
|
|
706
771
|
"""
|
707
772
|
return self.v2.stable.teams
|
708
773
|
|
774
|
+
@property
|
775
|
+
def test_orders(self) -> TestOrderService:
|
776
|
+
"""
|
777
|
+
Test Orders.
|
778
|
+
|
779
|
+
Test orders enable users to order tests for specific sample/container combinations that will be fulfilled in assays.
|
780
|
+
|
781
|
+
See https://benchling.com/api/reference?availability=la#/Test%20Orders/
|
782
|
+
"""
|
783
|
+
return self.v2.stable.test_orders
|
784
|
+
|
709
785
|
@property
|
710
786
|
def users(self) -> UserService:
|
711
787
|
"""
|
@@ -1,10 +1,10 @@
|
|
1
1
|
from dataclasses import dataclass
|
2
|
-
from typing import Any, cast, Generic, Optional, Type, TypeVar
|
2
|
+
from typing import Any, cast, Generic, List, Optional, Type, TypeVar, Union
|
3
3
|
|
4
4
|
from benchling_api_client.v2.stable.client import Client
|
5
5
|
|
6
6
|
from benchling_sdk.helpers.serialization_helpers import unset_as_none
|
7
|
-
from benchling_sdk.models import AsyncTaskErrors, AsyncTaskLink, AsyncTaskStatus
|
7
|
+
from benchling_sdk.models import AsyncTaskErrors, AsyncTaskErrorsItem, AsyncTaskLink, AsyncTaskStatus
|
8
8
|
|
9
9
|
ResponseT = TypeVar("ResponseT")
|
10
10
|
|
@@ -14,7 +14,7 @@ class TaskCompletion(Generic[ResponseT]):
|
|
14
14
|
"""Return type for TaskHelper.wait_for_task, same as AsyncTask but with a typed response."""
|
15
15
|
|
16
16
|
success: bool
|
17
|
-
errors: Optional[AsyncTaskErrors] = None
|
17
|
+
errors: Optional[Union[AsyncTaskErrors, List[AsyncTaskErrorsItem]]] = None
|
18
18
|
message: Optional[str] = None
|
19
19
|
response: Optional[ResponseT] = None
|
20
20
|
|
@@ -23,7 +23,7 @@ class TaskCompletion(Generic[ResponseT]):
|
|
23
23
|
class TaskFailureException(Exception):
|
24
24
|
"""Exception type used by :py:class:`.TaskHelper` methods."""
|
25
25
|
|
26
|
-
errors: AsyncTaskErrors
|
26
|
+
errors: Union[AsyncTaskErrors, List[AsyncTaskErrorsItem]]
|
27
27
|
message: Optional[str]
|
28
28
|
|
29
29
|
|
@@ -112,7 +112,7 @@ class TaskHelper(AsyncTaskLink, Generic[ResponseT]):
|
|
112
112
|
message = None if task.status != AsyncTaskStatus.FAILED else unset_as_none(task.message)
|
113
113
|
return TaskCompletion(
|
114
114
|
success=task.status == AsyncTaskStatus.SUCCEEDED,
|
115
|
-
errors=errors,
|
115
|
+
errors=errors, # type: ignore
|
116
116
|
message=message,
|
117
117
|
response=response,
|
118
118
|
)
|