benchling-sdk 1.14.0a0__py3-none-any.whl → 1.15.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/benchling.py +30 -6
- benchling_sdk/models/__init__.py +112 -0
- benchling_sdk/services/v2/base_service.py +7 -0
- benchling_sdk/services/v2/stable/workflow_flowchart_config_version_service.py +32 -0
- benchling_sdk/services/v2/stable/workflow_flowchart_service.py +85 -0
- benchling_sdk/services/v2/v2_alpha_service.py +9 -9
- benchling_sdk/services/v2/v2_beta_service.py +28 -54
- benchling_sdk/services/v2/v2_stable_service.py +165 -335
- benchling_sdk/services/v2_service.py +17 -11
- {benchling_sdk-1.14.0a0.dist-info → benchling_sdk-1.15.0a0.dist-info}/METADATA +2 -2
- {benchling_sdk-1.14.0a0.dist-info → benchling_sdk-1.15.0a0.dist-info}/RECORD +13 -11
- {benchling_sdk-1.14.0a0.dist-info → benchling_sdk-1.15.0a0.dist-info}/LICENSE +0 -0
- {benchling_sdk-1.14.0a0.dist-info → benchling_sdk-1.15.0a0.dist-info}/WHEEL +0 -0
benchling_sdk/benchling.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
"""Provides the Benchling class, which is the main interface for accessing Benchling's API functionality."""
|
2
2
|
from __future__ import annotations
|
3
3
|
|
4
|
+
from functools import cached_property
|
4
5
|
import re
|
5
6
|
from typing import Optional, Protocol, TYPE_CHECKING
|
6
7
|
import urllib.parse
|
@@ -53,6 +54,10 @@ if TYPE_CHECKING:
|
|
53
54
|
from benchling_sdk.services.v2.stable.team_service import TeamService
|
54
55
|
from benchling_sdk.services.v2.stable.user_service import UserService
|
55
56
|
from benchling_sdk.services.v2.stable.warehouse_service import WarehouseService
|
57
|
+
from benchling_sdk.services.v2.stable.workflow_flowchart_config_version_service import (
|
58
|
+
WorkflowFlowchartConfigVersionService,
|
59
|
+
)
|
60
|
+
from benchling_sdk.services.v2.stable.workflow_flowchart_service import WorkflowFlowchartService
|
56
61
|
from benchling_sdk.services.v2.stable.workflow_output_service import WorkflowOutputService
|
57
62
|
from benchling_sdk.services.v2.stable.workflow_task_group_service import WorkflowTaskGroupService
|
58
63
|
from benchling_sdk.services.v2.stable.workflow_task_service import WorkflowTaskService
|
@@ -154,19 +159,16 @@ class Benchling(object):
|
|
154
159
|
"""
|
155
160
|
return self._client
|
156
161
|
|
157
|
-
@
|
162
|
+
@cached_property
|
158
163
|
def v2(self) -> V2Service:
|
159
164
|
"""
|
160
165
|
V2.
|
161
166
|
|
162
167
|
Namespace containing support for the V2 Benchling API.
|
163
168
|
"""
|
164
|
-
|
165
|
-
from benchling_sdk.services.v2_service import V2Service
|
166
|
-
|
167
|
-
self._v2_service = V2Service(self._client, retry_strategy=self._retry_strategy)
|
169
|
+
from benchling_sdk.services.v2_service import V2Service
|
168
170
|
|
169
|
-
return self.
|
171
|
+
return V2Service(self._client, retry_strategy=self._retry_strategy)
|
170
172
|
|
171
173
|
# ------------------------------------------------------------------------------------
|
172
174
|
# Kept for compatibility and ease of access. New services should be added in services.v2.stable and
|
@@ -674,6 +676,28 @@ class Benchling(object):
|
|
674
676
|
"""
|
675
677
|
return self.v2.stable.warehouse
|
676
678
|
|
679
|
+
@property
|
680
|
+
def workflow_flowcharts(self) -> WorkflowFlowchartService:
|
681
|
+
"""
|
682
|
+
Workflow Flowcharts.
|
683
|
+
|
684
|
+
Workflow flowcharts represent the nodes and edges that a flowchart is comprised of.
|
685
|
+
|
686
|
+
See https://benchling.com/api/reference#/Workflow%20Flowcharts
|
687
|
+
"""
|
688
|
+
return self.v2.stable.workflow_flowcharts
|
689
|
+
|
690
|
+
@property
|
691
|
+
def workflow_flowchart_config_versions(self) -> WorkflowFlowchartConfigVersionService:
|
692
|
+
"""
|
693
|
+
Workflow Flowchart Config Versions.
|
694
|
+
|
695
|
+
Workflow flowchart config versions are versioned graphs of flowchart configurations.
|
696
|
+
|
697
|
+
See https://benchling.com/api/reference#/Workflow%20Flowchart%20Config%20Versions
|
698
|
+
"""
|
699
|
+
return self.v2.stable.workflow_flowchart_config_versions
|
700
|
+
|
677
701
|
@property
|
678
702
|
def workflow_outputs(self) -> WorkflowOutputService:
|
679
703
|
"""
|
benchling_sdk/models/__init__.py
CHANGED
@@ -650,6 +650,7 @@ __all__ = [
|
|
650
650
|
"ListRNASequencesSort",
|
651
651
|
"ListTeamsSort",
|
652
652
|
"ListUsersSort",
|
653
|
+
"ListWorkflowFlowchartsSort",
|
653
654
|
"ListWorkflowTasksScheduledOn",
|
654
655
|
"Location",
|
655
656
|
"LocationCreate",
|
@@ -729,7 +730,11 @@ __all__ = [
|
|
729
730
|
"NucleotideAlignment",
|
730
731
|
"NucleotideAlignmentBase",
|
731
732
|
"NucleotideAlignmentBaseAlgorithm",
|
733
|
+
"NucleotideAlignmentBaseClustaloOptions",
|
732
734
|
"NucleotideAlignmentBaseFilesItem",
|
735
|
+
"NucleotideAlignmentBaseMafftOptions",
|
736
|
+
"NucleotideAlignmentBaseMafftOptionsAdjustDirection",
|
737
|
+
"NucleotideAlignmentBaseMafftOptionsStrategy",
|
733
738
|
"NucleotideAlignmentFile",
|
734
739
|
"NucleotideAlignmentSummary",
|
735
740
|
"NucleotideAlignmentsPaginatedList",
|
@@ -990,7 +995,16 @@ __all__ = [
|
|
990
995
|
"Well",
|
991
996
|
"WellOrInaccessibleResource",
|
992
997
|
"WellResourceType",
|
998
|
+
"WorkflowEndNodeDetails",
|
999
|
+
"WorkflowFlowchart",
|
1000
|
+
"WorkflowFlowchartConfigSummary",
|
1001
|
+
"WorkflowFlowchartConfigVersion",
|
1002
|
+
"WorkflowFlowchartEdgeConfig",
|
1003
|
+
"WorkflowFlowchartNodeConfig",
|
1004
|
+
"WorkflowFlowchartNodeConfigNodeType",
|
1005
|
+
"WorkflowFlowchartPaginatedList",
|
993
1006
|
"WorkflowList",
|
1007
|
+
"WorkflowNodeTaskGroupSummary",
|
994
1008
|
"WorkflowOutput",
|
995
1009
|
"WorkflowOutputArchiveReason",
|
996
1010
|
"WorkflowOutputBulkCreate",
|
@@ -998,6 +1012,7 @@ __all__ = [
|
|
998
1012
|
"WorkflowOutputCreate",
|
999
1013
|
"WorkflowOutputCreatedEvent",
|
1000
1014
|
"WorkflowOutputCreatedEventEventType",
|
1015
|
+
"WorkflowOutputNodeDetails",
|
1001
1016
|
"WorkflowOutputSchema",
|
1002
1017
|
"WorkflowOutputSummary",
|
1003
1018
|
"WorkflowOutputUpdate",
|
@@ -1011,6 +1026,9 @@ __all__ = [
|
|
1011
1026
|
"WorkflowOutputsPaginatedList",
|
1012
1027
|
"WorkflowOutputsUnarchive",
|
1013
1028
|
"WorkflowPatch",
|
1029
|
+
"WorkflowRootNodeDetails",
|
1030
|
+
"WorkflowRouterFunction",
|
1031
|
+
"WorkflowRouterNodeDetails",
|
1014
1032
|
"WorkflowSample",
|
1015
1033
|
"WorkflowSampleList",
|
1016
1034
|
"WorkflowStage",
|
@@ -1045,6 +1063,7 @@ __all__ = [
|
|
1045
1063
|
"WorkflowTaskGroupsArchive",
|
1046
1064
|
"WorkflowTaskGroupsPaginatedList",
|
1047
1065
|
"WorkflowTaskGroupsUnarchive",
|
1066
|
+
"WorkflowTaskNodeDetails",
|
1048
1067
|
"WorkflowTaskSchema",
|
1049
1068
|
"WorkflowTaskSchemaBase",
|
1050
1069
|
"WorkflowTaskSchemaExecutionType",
|
@@ -1716,6 +1735,7 @@ if TYPE_CHECKING:
|
|
1716
1735
|
import benchling_api_client.v2.stable.models.list_rna_sequences_sort
|
1717
1736
|
import benchling_api_client.v2.stable.models.list_teams_sort
|
1718
1737
|
import benchling_api_client.v2.stable.models.list_users_sort
|
1738
|
+
import benchling_api_client.v2.stable.models.list_workflow_flowcharts_sort
|
1719
1739
|
import benchling_api_client.v2.stable.models.list_workflow_tasks_scheduled_on
|
1720
1740
|
import benchling_api_client.v2.stable.models.location
|
1721
1741
|
import benchling_api_client.v2.stable.models.location_create
|
@@ -1795,7 +1815,11 @@ if TYPE_CHECKING:
|
|
1795
1815
|
import benchling_api_client.v2.stable.models.nucleotide_alignment
|
1796
1816
|
import benchling_api_client.v2.stable.models.nucleotide_alignment_base
|
1797
1817
|
import benchling_api_client.v2.stable.models.nucleotide_alignment_base_algorithm
|
1818
|
+
import benchling_api_client.v2.stable.models.nucleotide_alignment_base_clustalo_options
|
1798
1819
|
import benchling_api_client.v2.stable.models.nucleotide_alignment_base_files_item
|
1820
|
+
import benchling_api_client.v2.stable.models.nucleotide_alignment_base_mafft_options
|
1821
|
+
import benchling_api_client.v2.stable.models.nucleotide_alignment_base_mafft_options_adjust_direction
|
1822
|
+
import benchling_api_client.v2.stable.models.nucleotide_alignment_base_mafft_options_strategy
|
1799
1823
|
import benchling_api_client.v2.stable.models.nucleotide_alignment_file
|
1800
1824
|
import benchling_api_client.v2.stable.models.nucleotide_alignment_summary
|
1801
1825
|
import benchling_api_client.v2.stable.models.nucleotide_alignments_paginated_list
|
@@ -2056,7 +2080,16 @@ if TYPE_CHECKING:
|
|
2056
2080
|
import benchling_api_client.v2.stable.models.well
|
2057
2081
|
import benchling_api_client.v2.stable.models.well_or_inaccessible_resource
|
2058
2082
|
import benchling_api_client.v2.stable.models.well_resource_type
|
2083
|
+
import benchling_api_client.v2.stable.models.workflow_end_node_details
|
2084
|
+
import benchling_api_client.v2.stable.models.workflow_flowchart
|
2085
|
+
import benchling_api_client.v2.stable.models.workflow_flowchart_config_summary
|
2086
|
+
import benchling_api_client.v2.stable.models.workflow_flowchart_config_version
|
2087
|
+
import benchling_api_client.v2.stable.models.workflow_flowchart_edge_config
|
2088
|
+
import benchling_api_client.v2.stable.models.workflow_flowchart_node_config
|
2089
|
+
import benchling_api_client.v2.stable.models.workflow_flowchart_node_config_node_type
|
2090
|
+
import benchling_api_client.v2.stable.models.workflow_flowchart_paginated_list
|
2059
2091
|
import benchling_api_client.v2.stable.models.workflow_list
|
2092
|
+
import benchling_api_client.v2.stable.models.workflow_node_task_group_summary
|
2060
2093
|
import benchling_api_client.v2.stable.models.workflow_output
|
2061
2094
|
import benchling_api_client.v2.stable.models.workflow_output_archive_reason
|
2062
2095
|
import benchling_api_client.v2.stable.models.workflow_output_bulk_create
|
@@ -2064,6 +2097,7 @@ if TYPE_CHECKING:
|
|
2064
2097
|
import benchling_api_client.v2.stable.models.workflow_output_create
|
2065
2098
|
import benchling_api_client.v2.stable.models.workflow_output_created_event
|
2066
2099
|
import benchling_api_client.v2.stable.models.workflow_output_created_event_event_type
|
2100
|
+
import benchling_api_client.v2.stable.models.workflow_output_node_details
|
2067
2101
|
import benchling_api_client.v2.stable.models.workflow_output_schema
|
2068
2102
|
import benchling_api_client.v2.stable.models.workflow_output_summary
|
2069
2103
|
import benchling_api_client.v2.stable.models.workflow_output_update
|
@@ -2077,6 +2111,9 @@ if TYPE_CHECKING:
|
|
2077
2111
|
import benchling_api_client.v2.stable.models.workflow_outputs_paginated_list
|
2078
2112
|
import benchling_api_client.v2.stable.models.workflow_outputs_unarchive
|
2079
2113
|
import benchling_api_client.v2.stable.models.workflow_patch
|
2114
|
+
import benchling_api_client.v2.stable.models.workflow_root_node_details
|
2115
|
+
import benchling_api_client.v2.stable.models.workflow_router_function
|
2116
|
+
import benchling_api_client.v2.stable.models.workflow_router_node_details
|
2080
2117
|
import benchling_api_client.v2.stable.models.workflow_sample
|
2081
2118
|
import benchling_api_client.v2.stable.models.workflow_sample_list
|
2082
2119
|
import benchling_api_client.v2.stable.models.workflow_stage
|
@@ -2111,6 +2148,7 @@ if TYPE_CHECKING:
|
|
2111
2148
|
import benchling_api_client.v2.stable.models.workflow_task_groups_archive
|
2112
2149
|
import benchling_api_client.v2.stable.models.workflow_task_groups_paginated_list
|
2113
2150
|
import benchling_api_client.v2.stable.models.workflow_task_groups_unarchive
|
2151
|
+
import benchling_api_client.v2.stable.models.workflow_task_node_details
|
2114
2152
|
import benchling_api_client.v2.stable.models.workflow_task_schema
|
2115
2153
|
import benchling_api_client.v2.stable.models.workflow_task_schema_base
|
2116
2154
|
import benchling_api_client.v2.stable.models.workflow_task_schema_execution_type
|
@@ -3506,6 +3544,9 @@ if TYPE_CHECKING:
|
|
3506
3544
|
ListRNASequencesSort = benchling_api_client.v2.stable.models.list_rna_sequences_sort.ListRNASequencesSort
|
3507
3545
|
ListTeamsSort = benchling_api_client.v2.stable.models.list_teams_sort.ListTeamsSort
|
3508
3546
|
ListUsersSort = benchling_api_client.v2.stable.models.list_users_sort.ListUsersSort
|
3547
|
+
ListWorkflowFlowchartsSort = (
|
3548
|
+
benchling_api_client.v2.stable.models.list_workflow_flowcharts_sort.ListWorkflowFlowchartsSort
|
3549
|
+
)
|
3509
3550
|
ListWorkflowTasksScheduledOn = (
|
3510
3551
|
benchling_api_client.v2.stable.models.list_workflow_tasks_scheduled_on.ListWorkflowTasksScheduledOn
|
3511
3552
|
)
|
@@ -3659,9 +3700,21 @@ if TYPE_CHECKING:
|
|
3659
3700
|
NucleotideAlignmentBaseAlgorithm = (
|
3660
3701
|
benchling_api_client.v2.stable.models.nucleotide_alignment_base_algorithm.NucleotideAlignmentBaseAlgorithm
|
3661
3702
|
)
|
3703
|
+
NucleotideAlignmentBaseClustaloOptions = (
|
3704
|
+
benchling_api_client.v2.stable.models.nucleotide_alignment_base_clustalo_options.NucleotideAlignmentBaseClustaloOptions
|
3705
|
+
)
|
3662
3706
|
NucleotideAlignmentBaseFilesItem = (
|
3663
3707
|
benchling_api_client.v2.stable.models.nucleotide_alignment_base_files_item.NucleotideAlignmentBaseFilesItem
|
3664
3708
|
)
|
3709
|
+
NucleotideAlignmentBaseMafftOptions = (
|
3710
|
+
benchling_api_client.v2.stable.models.nucleotide_alignment_base_mafft_options.NucleotideAlignmentBaseMafftOptions
|
3711
|
+
)
|
3712
|
+
NucleotideAlignmentBaseMafftOptionsAdjustDirection = (
|
3713
|
+
benchling_api_client.v2.stable.models.nucleotide_alignment_base_mafft_options_adjust_direction.NucleotideAlignmentBaseMafftOptionsAdjustDirection
|
3714
|
+
)
|
3715
|
+
NucleotideAlignmentBaseMafftOptionsStrategy = (
|
3716
|
+
benchling_api_client.v2.stable.models.nucleotide_alignment_base_mafft_options_strategy.NucleotideAlignmentBaseMafftOptionsStrategy
|
3717
|
+
)
|
3665
3718
|
NucleotideAlignmentFile = (
|
3666
3719
|
benchling_api_client.v2.stable.models.nucleotide_alignment_file.NucleotideAlignmentFile
|
3667
3720
|
)
|
@@ -4182,7 +4235,32 @@ if TYPE_CHECKING:
|
|
4182
4235
|
benchling_api_client.v2.stable.models.well_or_inaccessible_resource.WellOrInaccessibleResource
|
4183
4236
|
)
|
4184
4237
|
WellResourceType = benchling_api_client.v2.stable.models.well_resource_type.WellResourceType
|
4238
|
+
WorkflowEndNodeDetails = (
|
4239
|
+
benchling_api_client.v2.stable.models.workflow_end_node_details.WorkflowEndNodeDetails
|
4240
|
+
)
|
4241
|
+
WorkflowFlowchart = benchling_api_client.v2.stable.models.workflow_flowchart.WorkflowFlowchart
|
4242
|
+
WorkflowFlowchartConfigSummary = (
|
4243
|
+
benchling_api_client.v2.stable.models.workflow_flowchart_config_summary.WorkflowFlowchartConfigSummary
|
4244
|
+
)
|
4245
|
+
WorkflowFlowchartConfigVersion = (
|
4246
|
+
benchling_api_client.v2.stable.models.workflow_flowchart_config_version.WorkflowFlowchartConfigVersion
|
4247
|
+
)
|
4248
|
+
WorkflowFlowchartEdgeConfig = (
|
4249
|
+
benchling_api_client.v2.stable.models.workflow_flowchart_edge_config.WorkflowFlowchartEdgeConfig
|
4250
|
+
)
|
4251
|
+
WorkflowFlowchartNodeConfig = (
|
4252
|
+
benchling_api_client.v2.stable.models.workflow_flowchart_node_config.WorkflowFlowchartNodeConfig
|
4253
|
+
)
|
4254
|
+
WorkflowFlowchartNodeConfigNodeType = (
|
4255
|
+
benchling_api_client.v2.stable.models.workflow_flowchart_node_config_node_type.WorkflowFlowchartNodeConfigNodeType
|
4256
|
+
)
|
4257
|
+
WorkflowFlowchartPaginatedList = (
|
4258
|
+
benchling_api_client.v2.stable.models.workflow_flowchart_paginated_list.WorkflowFlowchartPaginatedList
|
4259
|
+
)
|
4185
4260
|
WorkflowList = benchling_api_client.v2.stable.models.workflow_list.WorkflowList
|
4261
|
+
WorkflowNodeTaskGroupSummary = (
|
4262
|
+
benchling_api_client.v2.stable.models.workflow_node_task_group_summary.WorkflowNodeTaskGroupSummary
|
4263
|
+
)
|
4186
4264
|
WorkflowOutput = benchling_api_client.v2.stable.models.workflow_output.WorkflowOutput
|
4187
4265
|
WorkflowOutputArchiveReason = (
|
4188
4266
|
benchling_api_client.v2.stable.models.workflow_output_archive_reason.WorkflowOutputArchiveReason
|
@@ -4200,6 +4278,9 @@ if TYPE_CHECKING:
|
|
4200
4278
|
WorkflowOutputCreatedEventEventType = (
|
4201
4279
|
benchling_api_client.v2.stable.models.workflow_output_created_event_event_type.WorkflowOutputCreatedEventEventType
|
4202
4280
|
)
|
4281
|
+
WorkflowOutputNodeDetails = (
|
4282
|
+
benchling_api_client.v2.stable.models.workflow_output_node_details.WorkflowOutputNodeDetails
|
4283
|
+
)
|
4203
4284
|
WorkflowOutputSchema = benchling_api_client.v2.stable.models.workflow_output_schema.WorkflowOutputSchema
|
4204
4285
|
WorkflowOutputSummary = (
|
4205
4286
|
benchling_api_client.v2.stable.models.workflow_output_summary.WorkflowOutputSummary
|
@@ -4233,6 +4314,15 @@ if TYPE_CHECKING:
|
|
4233
4314
|
benchling_api_client.v2.stable.models.workflow_outputs_unarchive.WorkflowOutputsUnarchive
|
4234
4315
|
)
|
4235
4316
|
WorkflowPatch = benchling_api_client.v2.stable.models.workflow_patch.WorkflowPatch
|
4317
|
+
WorkflowRootNodeDetails = (
|
4318
|
+
benchling_api_client.v2.stable.models.workflow_root_node_details.WorkflowRootNodeDetails
|
4319
|
+
)
|
4320
|
+
WorkflowRouterFunction = (
|
4321
|
+
benchling_api_client.v2.stable.models.workflow_router_function.WorkflowRouterFunction
|
4322
|
+
)
|
4323
|
+
WorkflowRouterNodeDetails = (
|
4324
|
+
benchling_api_client.v2.stable.models.workflow_router_node_details.WorkflowRouterNodeDetails
|
4325
|
+
)
|
4236
4326
|
WorkflowSample = benchling_api_client.v2.stable.models.workflow_sample.WorkflowSample
|
4237
4327
|
WorkflowSampleList = benchling_api_client.v2.stable.models.workflow_sample_list.WorkflowSampleList
|
4238
4328
|
WorkflowStage = benchling_api_client.v2.stable.models.workflow_stage.WorkflowStage
|
@@ -4315,6 +4405,9 @@ if TYPE_CHECKING:
|
|
4315
4405
|
WorkflowTaskGroupsUnarchive = (
|
4316
4406
|
benchling_api_client.v2.stable.models.workflow_task_groups_unarchive.WorkflowTaskGroupsUnarchive
|
4317
4407
|
)
|
4408
|
+
WorkflowTaskNodeDetails = (
|
4409
|
+
benchling_api_client.v2.stable.models.workflow_task_node_details.WorkflowTaskNodeDetails
|
4410
|
+
)
|
4318
4411
|
WorkflowTaskSchema = benchling_api_client.v2.stable.models.workflow_task_schema.WorkflowTaskSchema
|
4319
4412
|
WorkflowTaskSchemaBase = (
|
4320
4413
|
benchling_api_client.v2.stable.models.workflow_task_schema_base.WorkflowTaskSchemaBase
|
@@ -5030,6 +5123,7 @@ else:
|
|
5030
5123
|
"ListRNASequencesSort": "benchling_api_client.v2.stable.models.list_rna_sequences_sort",
|
5031
5124
|
"ListTeamsSort": "benchling_api_client.v2.stable.models.list_teams_sort",
|
5032
5125
|
"ListUsersSort": "benchling_api_client.v2.stable.models.list_users_sort",
|
5126
|
+
"ListWorkflowFlowchartsSort": "benchling_api_client.v2.stable.models.list_workflow_flowcharts_sort",
|
5033
5127
|
"ListWorkflowTasksScheduledOn": "benchling_api_client.v2.stable.models.list_workflow_tasks_scheduled_on",
|
5034
5128
|
"Location": "benchling_api_client.v2.stable.models.location",
|
5035
5129
|
"LocationCreate": "benchling_api_client.v2.stable.models.location_create",
|
@@ -5109,7 +5203,11 @@ else:
|
|
5109
5203
|
"NucleotideAlignment": "benchling_api_client.v2.stable.models.nucleotide_alignment",
|
5110
5204
|
"NucleotideAlignmentBase": "benchling_api_client.v2.stable.models.nucleotide_alignment_base",
|
5111
5205
|
"NucleotideAlignmentBaseAlgorithm": "benchling_api_client.v2.stable.models.nucleotide_alignment_base_algorithm",
|
5206
|
+
"NucleotideAlignmentBaseClustaloOptions": "benchling_api_client.v2.stable.models.nucleotide_alignment_base_clustalo_options",
|
5112
5207
|
"NucleotideAlignmentBaseFilesItem": "benchling_api_client.v2.stable.models.nucleotide_alignment_base_files_item",
|
5208
|
+
"NucleotideAlignmentBaseMafftOptions": "benchling_api_client.v2.stable.models.nucleotide_alignment_base_mafft_options",
|
5209
|
+
"NucleotideAlignmentBaseMafftOptionsAdjustDirection": "benchling_api_client.v2.stable.models.nucleotide_alignment_base_mafft_options_adjust_direction",
|
5210
|
+
"NucleotideAlignmentBaseMafftOptionsStrategy": "benchling_api_client.v2.stable.models.nucleotide_alignment_base_mafft_options_strategy",
|
5113
5211
|
"NucleotideAlignmentFile": "benchling_api_client.v2.stable.models.nucleotide_alignment_file",
|
5114
5212
|
"NucleotideAlignmentSummary": "benchling_api_client.v2.stable.models.nucleotide_alignment_summary",
|
5115
5213
|
"NucleotideAlignmentsPaginatedList": "benchling_api_client.v2.stable.models.nucleotide_alignments_paginated_list",
|
@@ -5370,7 +5468,16 @@ else:
|
|
5370
5468
|
"Well": "benchling_api_client.v2.stable.models.well",
|
5371
5469
|
"WellOrInaccessibleResource": "benchling_api_client.v2.stable.models.well_or_inaccessible_resource",
|
5372
5470
|
"WellResourceType": "benchling_api_client.v2.stable.models.well_resource_type",
|
5471
|
+
"WorkflowEndNodeDetails": "benchling_api_client.v2.stable.models.workflow_end_node_details",
|
5472
|
+
"WorkflowFlowchart": "benchling_api_client.v2.stable.models.workflow_flowchart",
|
5473
|
+
"WorkflowFlowchartConfigSummary": "benchling_api_client.v2.stable.models.workflow_flowchart_config_summary",
|
5474
|
+
"WorkflowFlowchartConfigVersion": "benchling_api_client.v2.stable.models.workflow_flowchart_config_version",
|
5475
|
+
"WorkflowFlowchartEdgeConfig": "benchling_api_client.v2.stable.models.workflow_flowchart_edge_config",
|
5476
|
+
"WorkflowFlowchartNodeConfig": "benchling_api_client.v2.stable.models.workflow_flowchart_node_config",
|
5477
|
+
"WorkflowFlowchartNodeConfigNodeType": "benchling_api_client.v2.stable.models.workflow_flowchart_node_config_node_type",
|
5478
|
+
"WorkflowFlowchartPaginatedList": "benchling_api_client.v2.stable.models.workflow_flowchart_paginated_list",
|
5373
5479
|
"WorkflowList": "benchling_api_client.v2.stable.models.workflow_list",
|
5480
|
+
"WorkflowNodeTaskGroupSummary": "benchling_api_client.v2.stable.models.workflow_node_task_group_summary",
|
5374
5481
|
"WorkflowOutput": "benchling_api_client.v2.stable.models.workflow_output",
|
5375
5482
|
"WorkflowOutputArchiveReason": "benchling_api_client.v2.stable.models.workflow_output_archive_reason",
|
5376
5483
|
"WorkflowOutputBulkCreate": "benchling_api_client.v2.stable.models.workflow_output_bulk_create",
|
@@ -5378,6 +5485,7 @@ else:
|
|
5378
5485
|
"WorkflowOutputCreate": "benchling_api_client.v2.stable.models.workflow_output_create",
|
5379
5486
|
"WorkflowOutputCreatedEvent": "benchling_api_client.v2.stable.models.workflow_output_created_event",
|
5380
5487
|
"WorkflowOutputCreatedEventEventType": "benchling_api_client.v2.stable.models.workflow_output_created_event_event_type",
|
5488
|
+
"WorkflowOutputNodeDetails": "benchling_api_client.v2.stable.models.workflow_output_node_details",
|
5381
5489
|
"WorkflowOutputSchema": "benchling_api_client.v2.stable.models.workflow_output_schema",
|
5382
5490
|
"WorkflowOutputSummary": "benchling_api_client.v2.stable.models.workflow_output_summary",
|
5383
5491
|
"WorkflowOutputUpdate": "benchling_api_client.v2.stable.models.workflow_output_update",
|
@@ -5391,6 +5499,9 @@ else:
|
|
5391
5499
|
"WorkflowOutputsPaginatedList": "benchling_api_client.v2.stable.models.workflow_outputs_paginated_list",
|
5392
5500
|
"WorkflowOutputsUnarchive": "benchling_api_client.v2.stable.models.workflow_outputs_unarchive",
|
5393
5501
|
"WorkflowPatch": "benchling_api_client.v2.stable.models.workflow_patch",
|
5502
|
+
"WorkflowRootNodeDetails": "benchling_api_client.v2.stable.models.workflow_root_node_details",
|
5503
|
+
"WorkflowRouterFunction": "benchling_api_client.v2.stable.models.workflow_router_function",
|
5504
|
+
"WorkflowRouterNodeDetails": "benchling_api_client.v2.stable.models.workflow_router_node_details",
|
5394
5505
|
"WorkflowSample": "benchling_api_client.v2.stable.models.workflow_sample",
|
5395
5506
|
"WorkflowSampleList": "benchling_api_client.v2.stable.models.workflow_sample_list",
|
5396
5507
|
"WorkflowStage": "benchling_api_client.v2.stable.models.workflow_stage",
|
@@ -5425,6 +5536,7 @@ else:
|
|
5425
5536
|
"WorkflowTaskGroupsArchive": "benchling_api_client.v2.stable.models.workflow_task_groups_archive",
|
5426
5537
|
"WorkflowTaskGroupsPaginatedList": "benchling_api_client.v2.stable.models.workflow_task_groups_paginated_list",
|
5427
5538
|
"WorkflowTaskGroupsUnarchive": "benchling_api_client.v2.stable.models.workflow_task_groups_unarchive",
|
5539
|
+
"WorkflowTaskNodeDetails": "benchling_api_client.v2.stable.models.workflow_task_node_details",
|
5428
5540
|
"WorkflowTaskSchema": "benchling_api_client.v2.stable.models.workflow_task_schema",
|
5429
5541
|
"WorkflowTaskSchemaBase": "benchling_api_client.v2.stable.models.workflow_task_schema_base",
|
5430
5542
|
"WorkflowTaskSchemaExecutionType": "benchling_api_client.v2.stable.models.workflow_task_schema_execution_type",
|
@@ -30,3 +30,10 @@ class BaseService(ABC):
|
|
30
30
|
def retry_strategy(self) -> RetryStrategy:
|
31
31
|
"""Provide access to the underlying user-specified RetryStrategy."""
|
32
32
|
return self._retry_strategy
|
33
|
+
|
34
|
+
def _create_service(self, cls):
|
35
|
+
"""Instantiate a service that derives from BaseService, with the same properties as this service.
|
36
|
+
|
37
|
+
Override this in alpha and beta services that use a client other than self._client.
|
38
|
+
"""
|
39
|
+
return cls(self._client, self._retry_strategy)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
from benchling_api_client.v2.stable.api.workflow_flowchart_config_versions import (
|
2
|
+
get_workflow_flowchart_config_version,
|
3
|
+
)
|
4
|
+
|
5
|
+
from benchling_sdk.helpers.decorators import api_method
|
6
|
+
from benchling_sdk.helpers.response_helpers import model_from_detailed
|
7
|
+
from benchling_sdk.models import WorkflowFlowchartConfigVersion
|
8
|
+
from benchling_sdk.services.v2.base_service import BaseService
|
9
|
+
|
10
|
+
|
11
|
+
class WorkflowFlowchartConfigVersionService(BaseService):
|
12
|
+
"""
|
13
|
+
Workflow Flowchart Config Versions.
|
14
|
+
|
15
|
+
Workflow flowchart config versions are versioned graphs of flowchart configurations.
|
16
|
+
|
17
|
+
See https://benchling.com/api/reference#/Workflow%20Flowchart%20Config%20Versions
|
18
|
+
"""
|
19
|
+
|
20
|
+
@api_method
|
21
|
+
def get_by_id(self, workflow_flowchart_config_version_id: str) -> WorkflowFlowchartConfigVersion:
|
22
|
+
"""
|
23
|
+
Get a workflow flowchart config version.
|
24
|
+
|
25
|
+
If there is a template flowchart, serializes that flowchart in the same format as the workflow_flowcharts service.
|
26
|
+
|
27
|
+
See https://benchling.com/api/reference#/Workflow%20Flowcharts/getWorkflowConfigVersion
|
28
|
+
"""
|
29
|
+
response = get_workflow_flowchart_config_version.sync_detailed(
|
30
|
+
client=self.client, workflow_flowchart_config_version_id=workflow_flowchart_config_version_id
|
31
|
+
)
|
32
|
+
return model_from_detailed(response)
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import datetime
|
2
|
+
from typing import Iterable, List, Optional
|
3
|
+
|
4
|
+
from benchling_api_client.v2.stable.api.workflow_flowcharts import (
|
5
|
+
get_workflow_flowchart,
|
6
|
+
list_workflow_flowcharts,
|
7
|
+
)
|
8
|
+
from benchling_api_client.v2.types import Response
|
9
|
+
|
10
|
+
from benchling_sdk.errors import raise_for_status
|
11
|
+
from benchling_sdk.helpers.decorators import api_method
|
12
|
+
from benchling_sdk.helpers.pagination_helpers import NextToken, PageIterator
|
13
|
+
from benchling_sdk.helpers.response_helpers import model_from_detailed
|
14
|
+
from benchling_sdk.helpers.serialization_helpers import none_as_unset, optional_array_query_param
|
15
|
+
from benchling_sdk.models import ListWorkflowFlowchartsSort, WorkflowFlowchart, WorkflowFlowchartPaginatedList
|
16
|
+
from benchling_sdk.services.v2.base_service import BaseService
|
17
|
+
|
18
|
+
|
19
|
+
class WorkflowFlowchartService(BaseService):
|
20
|
+
"""
|
21
|
+
Workflow Flowcharts.
|
22
|
+
|
23
|
+
Workflow flowcharts represent the nodes and edges that a flowchart is comprised of.
|
24
|
+
|
25
|
+
See https://benchling.com/api/reference#/Workflow%20Flowcharts
|
26
|
+
"""
|
27
|
+
|
28
|
+
@api_method
|
29
|
+
def get_by_id(self, workflow_flowchart_id: str) -> WorkflowFlowchart:
|
30
|
+
"""
|
31
|
+
Get a workflow flowchart.
|
32
|
+
|
33
|
+
See https://benchling.com/api/reference#/Workflow%20Flowcharts/getWorkflowFlowchart
|
34
|
+
"""
|
35
|
+
response = get_workflow_flowchart.sync_detailed(
|
36
|
+
client=self.client, workflow_flowchart_id=workflow_flowchart_id
|
37
|
+
)
|
38
|
+
return model_from_detailed(response)
|
39
|
+
|
40
|
+
@api_method
|
41
|
+
def _workflow_tasks_page(
|
42
|
+
self,
|
43
|
+
sort: Optional[ListWorkflowFlowchartsSort] = None,
|
44
|
+
ids: Optional[Iterable[str]] = None,
|
45
|
+
created_at: Optional[datetime.date] = None,
|
46
|
+
page_size: Optional[int] = None,
|
47
|
+
next_token: NextToken = None,
|
48
|
+
) -> Response[WorkflowFlowchartPaginatedList]:
|
49
|
+
response = list_workflow_flowcharts.sync_detailed(
|
50
|
+
client=self.client,
|
51
|
+
ids=none_as_unset(optional_array_query_param(ids)),
|
52
|
+
created_at=none_as_unset(created_at),
|
53
|
+
next_token=none_as_unset(next_token),
|
54
|
+
page_size=none_as_unset(page_size),
|
55
|
+
sort=none_as_unset(sort),
|
56
|
+
)
|
57
|
+
raise_for_status(response)
|
58
|
+
return response # type: ignore
|
59
|
+
|
60
|
+
def list(
|
61
|
+
self,
|
62
|
+
sort: Optional[ListWorkflowFlowchartsSort] = None,
|
63
|
+
ids: Optional[Iterable[str]] = None,
|
64
|
+
created_at: Optional[datetime.date] = None,
|
65
|
+
page_size: Optional[int] = None,
|
66
|
+
) -> PageIterator[WorkflowFlowchart]:
|
67
|
+
"""
|
68
|
+
List workflow flowcharts.
|
69
|
+
|
70
|
+
See https://benchling.com/api/reference#/Workflow%20Tasks/listWorkflowFlowcharts
|
71
|
+
"""
|
72
|
+
|
73
|
+
def api_call(next_token: NextToken) -> Response[WorkflowFlowchartPaginatedList]:
|
74
|
+
return self._workflow_tasks_page(
|
75
|
+
sort=sort,
|
76
|
+
ids=ids,
|
77
|
+
created_at=created_at,
|
78
|
+
page_size=page_size,
|
79
|
+
next_token=next_token,
|
80
|
+
)
|
81
|
+
|
82
|
+
def results_extractor(body: WorkflowFlowchartPaginatedList) -> Optional[List[WorkflowFlowchart]]:
|
83
|
+
return body.workflow_flowcharts
|
84
|
+
|
85
|
+
return PageIterator(api_call, results_extractor)
|
@@ -1,6 +1,7 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
-
from
|
3
|
+
from functools import cached_property
|
4
|
+
from typing import TYPE_CHECKING
|
4
5
|
|
5
6
|
from benchling_api_client.v2.stable.client import Client
|
6
7
|
|
@@ -22,7 +23,6 @@ class V2AlphaService(BaseService):
|
|
22
23
|
See https://benchling.com/api/v2-alpha/reference
|
23
24
|
"""
|
24
25
|
|
25
|
-
_app_service: Optional[V2AlphaAppService]
|
26
26
|
_alpha_client: Client
|
27
27
|
|
28
28
|
def __init__(self, client: Client, retry_strategy: RetryStrategy = RetryStrategy()):
|
@@ -34,10 +34,8 @@ class V2AlphaService(BaseService):
|
|
34
34
|
"""
|
35
35
|
super().__init__(client, retry_strategy)
|
36
36
|
self._alpha_client = v2_alpha_client(self.client)
|
37
|
-
self._app_service = None
|
38
|
-
self._dna_sequence_service = None
|
39
37
|
|
40
|
-
@
|
38
|
+
@cached_property
|
41
39
|
def apps(self) -> V2AlphaAppService:
|
42
40
|
"""
|
43
41
|
V2-Alpha Apps.
|
@@ -46,8 +44,10 @@ class V2AlphaService(BaseService):
|
|
46
44
|
|
47
45
|
https://benchling.com/api/v2-alpha/reference?stability=not-available#/Apps
|
48
46
|
"""
|
49
|
-
|
50
|
-
from benchling_sdk.services.v2.alpha.v2_alpha_app_service import V2AlphaAppService
|
47
|
+
from .alpha.v2_alpha_app_service import V2AlphaAppService
|
51
48
|
|
52
|
-
|
53
|
-
|
49
|
+
return self._create_service(V2AlphaAppService)
|
50
|
+
|
51
|
+
def _create_service(self, cls):
|
52
|
+
"""Instantiate a service using the alpha client."""
|
53
|
+
return cls(self._alpha_client, self._retry_strategy)
|