autoassembler 0.3.1__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.
- autoassembler/.fernignore +7 -0
- autoassembler/__init__.py +537 -0
- autoassembler/_custom/__init__.py +56 -0
- autoassembler/_custom/assemblies.py +226 -0
- autoassembler/_custom/assemblies_api.py +188 -0
- autoassembler/_custom/credentials.py +248 -0
- autoassembler/_custom/http.py +42 -0
- autoassembler/_custom/operations.py +258 -0
- autoassembler/_custom/planning.py +598 -0
- autoassembler/_custom/planning_api.py +225 -0
- autoassembler/_default_clients.py +32 -0
- autoassembler/_version.py +8 -0
- autoassembler/alpha/__init__.py +63 -0
- autoassembler/alpha/client.py +82 -0
- autoassembler/alpha/jobs/__init__.py +39 -0
- autoassembler/alpha/jobs/client.py +338 -0
- autoassembler/alpha/jobs/raw_client.py +641 -0
- autoassembler/alpha/jobs/types/__init__.py +42 -0
- autoassembler/alpha/jobs/types/cancel_job_jobs_response.py +12 -0
- autoassembler/alpha/jobs/types/list_jobs_jobs_response.py +30 -0
- autoassembler/alpha/jobs/types/list_jobs_jobs_response_pagination.py +22 -0
- autoassembler/alpha/jobs/types/retry_job_jobs_response.py +16 -0
- autoassembler/alpha/planning/__init__.py +49 -0
- autoassembler/alpha/planning/client.py +201 -0
- autoassembler/alpha/planning/raw_client.py +268 -0
- autoassembler/alpha/planning/types/__init__.py +47 -0
- autoassembler/alpha/planning/types/apply_ops_planning_request_namespace.py +5 -0
- autoassembler/alpha/planning/types/apply_ops_planning_request_ops_item.py +13 -0
- autoassembler/alpha/planning/types/apply_ops_planning_request_ops_item_op.py +58 -0
- autoassembler/alpha/planning/types/apply_ops_planning_response.py +13 -0
- autoassembler/alpha/raw_client.py +13 -0
- autoassembler/assemblies/__init__.py +73 -0
- autoassembler/assemblies/client.py +1177 -0
- autoassembler/assemblies/raw_client.py +1557 -0
- autoassembler/assemblies/types/__init__.py +71 -0
- autoassembler/assemblies/types/delete_assembly_response.py +12 -0
- autoassembler/assemblies/types/download_assembly_cad_request_namespace.py +5 -0
- autoassembler/assemblies/types/get_assembly_info_request_namespace.py +5 -0
- autoassembler/assemblies/types/get_status_request_namespace.py +5 -0
- autoassembler/assemblies/types/get_status_response.py +16 -0
- autoassembler/assemblies/types/get_status_response_progress.py +13 -0
- autoassembler/assemblies/types/get_status_response_status.py +7 -0
- autoassembler/assemblies/types/get_structure_request_namespace.py +5 -0
- autoassembler/assemblies/types/list_assembly_versions_request_namespace.py +5 -0
- autoassembler/assemblies/types/list_connections_request_namespace.py +5 -0
- autoassembler/assemblies/types/process_request_namespace.py +5 -0
- autoassembler/assemblies/types/update_assembly_info_request_namespace.py +5 -0
- autoassembler/auth/__init__.py +34 -0
- autoassembler/auth/client.py +282 -0
- autoassembler/auth/raw_client.py +413 -0
- autoassembler/auth/types/__init__.py +36 -0
- autoassembler/auth/types/create_access_token_request_grant_type.py +7 -0
- autoassembler/base_client.py +328 -0
- autoassembler/client.py +262 -0
- autoassembler/core/__init__.py +127 -0
- autoassembler/core/api_error.py +23 -0
- autoassembler/core/client_wrapper.py +147 -0
- autoassembler/core/datetime_utils.py +70 -0
- autoassembler/core/file.py +67 -0
- autoassembler/core/force_multipart.py +18 -0
- autoassembler/core/http_client.py +965 -0
- autoassembler/core/http_response.py +63 -0
- autoassembler/core/http_sse/__init__.py +42 -0
- autoassembler/core/http_sse/_api.py +455 -0
- autoassembler/core/http_sse/_decoders.py +74 -0
- autoassembler/core/http_sse/_exceptions.py +7 -0
- autoassembler/core/http_sse/_models.py +17 -0
- autoassembler/core/jsonable_encoder.py +133 -0
- autoassembler/core/logging.py +107 -0
- autoassembler/core/parse_error.py +36 -0
- autoassembler/core/pydantic_utilities.py +486 -0
- autoassembler/core/query_encoder.py +58 -0
- autoassembler/core/remove_none_from_dict.py +11 -0
- autoassembler/core/request_options.py +40 -0
- autoassembler/core/serialization.py +347 -0
- autoassembler/environment.py +7 -0
- autoassembler/errors/__init__.py +56 -0
- autoassembler/errors/bad_request_error.py +10 -0
- autoassembler/errors/conflict_error.py +10 -0
- autoassembler/errors/forbidden_error.py +11 -0
- autoassembler/errors/internal_server_error.py +11 -0
- autoassembler/errors/not_found_error.py +11 -0
- autoassembler/errors/unauthorized_error.py +10 -0
- autoassembler/errors/unprocessable_entity_error.py +11 -0
- autoassembler/operation.py +196 -0
- autoassembler/operations/__init__.py +4 -0
- autoassembler/operations/client.py +209 -0
- autoassembler/operations/raw_client.py +343 -0
- autoassembler/planning/__init__.py +70 -0
- autoassembler/planning/client.py +1174 -0
- autoassembler/planning/raw_client.py +1349 -0
- autoassembler/planning/types/__init__.py +68 -0
- autoassembler/planning/types/adapt_request_namespace.py +5 -0
- autoassembler/planning/types/create_mpp_request_body.py +8 -0
- autoassembler/planning/types/create_mpp_request_namespace.py +5 -0
- autoassembler/planning/types/delete_mpp_request_namespace.py +5 -0
- autoassembler/planning/types/delete_mpp_response.py +12 -0
- autoassembler/planning/types/evaluate_dfa_request_namespace.py +5 -0
- autoassembler/planning/types/get_mpp_request_namespace.py +5 -0
- autoassembler/planning/types/get_mpp_response.py +27 -0
- autoassembler/planning/types/list_mpps_request_namespace.py +5 -0
- autoassembler/planning/types/plan_request_namespace.py +5 -0
- autoassembler/planning/types/validate_request_namespace.py +5 -0
- autoassembler/py.typed +0 -0
- autoassembler/sessions/__init__.py +4 -0
- autoassembler/sessions/client.py +102 -0
- autoassembler/sessions/raw_client.py +126 -0
- autoassembler/types/__init__.py +344 -0
- autoassembler/types/access_token_response.py +14 -0
- autoassembler/types/active_session.py +25 -0
- autoassembler/types/active_session_namespace.py +5 -0
- autoassembler/types/adapt_mpp_accepted.py +26 -0
- autoassembler/types/assembly.py +30 -0
- autoassembler/types/assembly_connection.py +21 -0
- autoassembler/types/assembly_connection_relationship.py +5 -0
- autoassembler/types/assembly_connections_response.py +13 -0
- autoassembler/types/assembly_diff_metadata.py +35 -0
- autoassembler/types/assembly_diff_response.py +34 -0
- autoassembler/types/assembly_info.py +36 -0
- autoassembler/types/assembly_json_response.py +15 -0
- autoassembler/types/assembly_process_metadata.py +32 -0
- autoassembler/types/assembly_process_response.py +18 -0
- autoassembler/types/assembly_search_hit.py +31 -0
- autoassembler/types/assembly_version_summary.py +27 -0
- autoassembler/types/conflict_error_body.py +19 -0
- autoassembler/types/conflict_error_body_error.py +5 -0
- autoassembler/types/create_mpp_request.py +13 -0
- autoassembler/types/device_authorization_response.py +17 -0
- autoassembler/types/diff_accepted.py +42 -0
- autoassembler/types/diff_context_node.py +20 -0
- autoassembler/types/diff_details.py +73 -0
- autoassembler/types/diff_error_response.py +38 -0
- autoassembler/types/diff_flags.py +74 -0
- autoassembler/types/diff_ml_semantics.py +55 -0
- autoassembler/types/diff_node.py +26 -0
- autoassembler/types/diff_node_pair_with_parts.py +90 -0
- autoassembler/types/diff_node_with_parent.py +15 -0
- autoassembler/types/diff_reference_target_nodes.py +25 -0
- autoassembler/types/diff_report.py +24 -0
- autoassembler/types/diff_rigid_alignment.py +30 -0
- autoassembler/types/diff_summary.py +121 -0
- autoassembler/types/diff_summary_assembly_labels.py +44 -0
- autoassembler/types/diff_summary_geometric_diffs.py +24 -0
- autoassembler/types/diff_summary_persistent_edges_congruence.py +24 -0
- autoassembler/types/diff_summary_persistent_edges_congruence_pose.py +24 -0
- autoassembler/types/diff_summary_persistent_nodes_congruence.py +24 -0
- autoassembler/types/diff_summary_persistent_nodes_congruence_pose.py +24 -0
- autoassembler/types/diff_summary_total_parts.py +24 -0
- autoassembler/types/diff_swap.py +65 -0
- autoassembler/types/diff_swap_confidence.py +5 -0
- autoassembler/types/diff_swap_group.py +92 -0
- autoassembler/types/diff_validation_issue.py +38 -0
- autoassembler/types/diff_validation_issue_severity.py +5 -0
- autoassembler/types/diff_validation_result.py +35 -0
- autoassembler/types/diff_warning.py +79 -0
- autoassembler/types/diff_warning_reason.py +18 -0
- autoassembler/types/diff_warning_severity.py +5 -0
- autoassembler/types/error_response.py +30 -0
- autoassembler/types/filter.py +19 -0
- autoassembler/types/filter_field.py +7 -0
- autoassembler/types/filter_operator.py +5 -0
- autoassembler/types/job.py +123 -0
- autoassembler/types/job_progress.py +24 -0
- autoassembler/types/job_status.py +5 -0
- autoassembler/types/list_operations_response.py +25 -0
- autoassembler/types/manufacturing_process_plan.py +57 -0
- autoassembler/types/mpp_adapt_metadata.py +48 -0
- autoassembler/types/mpp_adapt_response.py +22 -0
- autoassembler/types/mpp_evaluate_dfa_metadata.py +47 -0
- autoassembler/types/mpp_evaluate_dfa_response.py +22 -0
- autoassembler/types/mpp_plan_metadata.py +47 -0
- autoassembler/types/mpp_plan_response.py +22 -0
- autoassembler/types/mpp_summary.py +20 -0
- autoassembler/types/mpp_validate_metadata.py +47 -0
- autoassembler/types/mpp_validate_response.py +22 -0
- autoassembler/types/o_auth_error_response.py +14 -0
- autoassembler/types/o_auth_error_response_error.py +18 -0
- autoassembler/types/operation.py +27 -0
- autoassembler/types/operation_error.py +21 -0
- autoassembler/types/operation_metadata.py +148 -0
- autoassembler/types/operation_response.py +94 -0
- autoassembler/types/process_assembly_accepted.py +14 -0
- autoassembler/types/process_assembly_response.py +55 -0
- autoassembler/types/process_assembly_skipped.py +14 -0
- autoassembler/types/search_assemblies_response.py +14 -0
- autoassembler/types/seq_plan_accepted.py +24 -0
- autoassembler/types/sever.py +33 -0
- autoassembler/types/sever_kind.py +5 -0
- autoassembler/types/sever_source.py +5 -0
- autoassembler/types/sort.py +8 -0
- autoassembler/types/upload_response.py +19 -0
- autoassembler/types/user_info.py +19 -0
- autoassembler/types/user_info_response.py +23 -0
- autoassembler/types/user_info_response_providers.py +14 -0
- autoassembler-0.3.1.dist-info/METADATA +209 -0
- autoassembler-0.3.1.dist-info/RECORD +198 -0
- autoassembler-0.3.1.dist-info/WHEEL +4 -0
- autoassembler-0.3.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"""``client.api.planning``: the generated planning client, with operations for its runs.
|
|
2
|
+
|
|
3
|
+
Hand-written, protected via `.fernignore`. `PlanningApi` subclasses the generated
|
|
4
|
+
`PlanningClient` (keeping every MPP call); `plan`, `validate`, `evaluate_dfa` and `adapt`
|
|
5
|
+
replace the generated calls: they return an `Operation` to wait on rather than the 202 it
|
|
6
|
+
starts from. The operations namespace is injected so they can build it. The curated
|
|
7
|
+
`ProcessPlan` verbs are built on these.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import typing
|
|
11
|
+
|
|
12
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
13
|
+
from ..core.request_options import RequestOptions
|
|
14
|
+
from ..operation import AsyncOperation, Operation
|
|
15
|
+
from ..planning.client import OMIT, AsyncPlanningClient, PlanningClient
|
|
16
|
+
from ..planning.types.adapt_request_namespace import AdaptRequestNamespace
|
|
17
|
+
from ..planning.types.evaluate_dfa_request_namespace import EvaluateDfaRequestNamespace
|
|
18
|
+
from ..planning.types.plan_request_namespace import PlanRequestNamespace
|
|
19
|
+
from ..planning.types.validate_request_namespace import ValidateRequestNamespace
|
|
20
|
+
from ..types.diff_report import DiffReport
|
|
21
|
+
from ..types.operation_response import (
|
|
22
|
+
OperationResponse_MppAdapt,
|
|
23
|
+
OperationResponse_MppEvaluateDfa,
|
|
24
|
+
OperationResponse_MppPlan,
|
|
25
|
+
OperationResponse_MppValidate,
|
|
26
|
+
)
|
|
27
|
+
from .operations import AsyncOperations, Operations, async_response_of, response_of
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class PlanningApi(PlanningClient):
|
|
31
|
+
"""Generated planning client + operations for the station runs."""
|
|
32
|
+
|
|
33
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper, operations: Operations):
|
|
34
|
+
super().__init__(client_wrapper=client_wrapper)
|
|
35
|
+
self._operations = operations
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def plan( # pyright: ignore[reportIncompatibleMethodOverride]
|
|
39
|
+
self,
|
|
40
|
+
namespace: PlanRequestNamespace,
|
|
41
|
+
id: str,
|
|
42
|
+
mpp_id: str,
|
|
43
|
+
*,
|
|
44
|
+
station_ids: typing.Sequence[str],
|
|
45
|
+
overwrite: bool | None = OMIT,
|
|
46
|
+
request_options: RequestOptions | None = None,
|
|
47
|
+
) -> Operation[OperationResponse_MppPlan]:
|
|
48
|
+
"""Plan the stations.
|
|
49
|
+
|
|
50
|
+
The operation's result is the plan's version once their plans are saved.
|
|
51
|
+
"""
|
|
52
|
+
accepted = super().plan(
|
|
53
|
+
namespace,
|
|
54
|
+
id,
|
|
55
|
+
mpp_id,
|
|
56
|
+
station_ids=station_ids,
|
|
57
|
+
overwrite=overwrite,
|
|
58
|
+
request_options=request_options,
|
|
59
|
+
)
|
|
60
|
+
return self._operations.handle(accepted, resolve=response_of(OperationResponse_MppPlan))
|
|
61
|
+
|
|
62
|
+
def validate( # pyright: ignore[reportIncompatibleMethodOverride]
|
|
63
|
+
self,
|
|
64
|
+
namespace: ValidateRequestNamespace,
|
|
65
|
+
id: str,
|
|
66
|
+
mpp_id: str,
|
|
67
|
+
*,
|
|
68
|
+
station_ids: typing.Sequence[str],
|
|
69
|
+
fix_directions: bool | None = OMIT,
|
|
70
|
+
request_options: RequestOptions | None = None,
|
|
71
|
+
) -> Operation[OperationResponse_MppValidate]:
|
|
72
|
+
"""Validate the stations.
|
|
73
|
+
|
|
74
|
+
The operation's result is the plan's version once the verdicts are saved.
|
|
75
|
+
"""
|
|
76
|
+
accepted = super().validate(
|
|
77
|
+
namespace,
|
|
78
|
+
id,
|
|
79
|
+
mpp_id,
|
|
80
|
+
station_ids=station_ids,
|
|
81
|
+
fix_directions=fix_directions,
|
|
82
|
+
request_options=request_options,
|
|
83
|
+
)
|
|
84
|
+
return self._operations.handle(accepted, resolve=response_of(OperationResponse_MppValidate))
|
|
85
|
+
|
|
86
|
+
def evaluate_dfa( # pyright: ignore[reportIncompatibleMethodOverride]
|
|
87
|
+
self,
|
|
88
|
+
namespace: EvaluateDfaRequestNamespace,
|
|
89
|
+
id: str,
|
|
90
|
+
mpp_id: str,
|
|
91
|
+
*,
|
|
92
|
+
station_ids: typing.Sequence[str] | None = OMIT,
|
|
93
|
+
request_options: RequestOptions | None = None,
|
|
94
|
+
) -> Operation[OperationResponse_MppEvaluateDfa]:
|
|
95
|
+
"""Score the stations.
|
|
96
|
+
|
|
97
|
+
The operation's result is the plan's version once the scores are saved.
|
|
98
|
+
"""
|
|
99
|
+
accepted = super().evaluate_dfa(
|
|
100
|
+
namespace, id, mpp_id, station_ids=station_ids, request_options=request_options
|
|
101
|
+
)
|
|
102
|
+
return self._operations.handle(
|
|
103
|
+
accepted, resolve=response_of(OperationResponse_MppEvaluateDfa)
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
def adapt( # pyright: ignore[reportIncompatibleMethodOverride]
|
|
107
|
+
self,
|
|
108
|
+
namespace: AdaptRequestNamespace,
|
|
109
|
+
id: str,
|
|
110
|
+
*,
|
|
111
|
+
reference_mpp_id: str,
|
|
112
|
+
diff: DiffReport,
|
|
113
|
+
name: str | None = OMIT,
|
|
114
|
+
request_options: RequestOptions | None = None,
|
|
115
|
+
) -> Operation[OperationResponse_MppAdapt]:
|
|
116
|
+
"""Create a process plan for the assembly by adapting a reference assembly's plan.
|
|
117
|
+
|
|
118
|
+
``diff`` compares the reference assembly with this one. The operation's result is
|
|
119
|
+
the new plan's id and version once it is saved; ``op.operation.mpp_id`` names it
|
|
120
|
+
from the start.
|
|
121
|
+
"""
|
|
122
|
+
accepted = super().adapt(
|
|
123
|
+
namespace,
|
|
124
|
+
id,
|
|
125
|
+
reference_mpp_id=reference_mpp_id,
|
|
126
|
+
diff=diff,
|
|
127
|
+
name=name,
|
|
128
|
+
request_options=request_options,
|
|
129
|
+
)
|
|
130
|
+
return self._operations.handle(accepted, resolve=response_of(OperationResponse_MppAdapt))
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
class AsyncPlanningApi(AsyncPlanningClient):
|
|
134
|
+
"""Async generated planning client + operations for the station runs (see `PlanningApi`)."""
|
|
135
|
+
|
|
136
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper, operations: AsyncOperations):
|
|
137
|
+
super().__init__(client_wrapper=client_wrapper)
|
|
138
|
+
self._operations = operations
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
async def plan( # pyright: ignore[reportIncompatibleMethodOverride]
|
|
142
|
+
self,
|
|
143
|
+
namespace: PlanRequestNamespace,
|
|
144
|
+
id: str,
|
|
145
|
+
mpp_id: str,
|
|
146
|
+
*,
|
|
147
|
+
station_ids: typing.Sequence[str],
|
|
148
|
+
overwrite: bool | None = OMIT,
|
|
149
|
+
request_options: RequestOptions | None = None,
|
|
150
|
+
) -> AsyncOperation[OperationResponse_MppPlan]:
|
|
151
|
+
"""Plan the stations; see `PlanningApi.plan`."""
|
|
152
|
+
accepted = await super().plan(
|
|
153
|
+
namespace,
|
|
154
|
+
id,
|
|
155
|
+
mpp_id,
|
|
156
|
+
station_ids=station_ids,
|
|
157
|
+
overwrite=overwrite,
|
|
158
|
+
request_options=request_options,
|
|
159
|
+
)
|
|
160
|
+
return await self._operations.handle(
|
|
161
|
+
accepted, resolve=async_response_of(OperationResponse_MppPlan)
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
async def validate( # pyright: ignore[reportIncompatibleMethodOverride]
|
|
165
|
+
self,
|
|
166
|
+
namespace: ValidateRequestNamespace,
|
|
167
|
+
id: str,
|
|
168
|
+
mpp_id: str,
|
|
169
|
+
*,
|
|
170
|
+
station_ids: typing.Sequence[str],
|
|
171
|
+
fix_directions: bool | None = OMIT,
|
|
172
|
+
request_options: RequestOptions | None = None,
|
|
173
|
+
) -> AsyncOperation[OperationResponse_MppValidate]:
|
|
174
|
+
"""Validate the stations; see `PlanningApi.validate`."""
|
|
175
|
+
accepted = await super().validate(
|
|
176
|
+
namespace,
|
|
177
|
+
id,
|
|
178
|
+
mpp_id,
|
|
179
|
+
station_ids=station_ids,
|
|
180
|
+
fix_directions=fix_directions,
|
|
181
|
+
request_options=request_options,
|
|
182
|
+
)
|
|
183
|
+
return await self._operations.handle(
|
|
184
|
+
accepted, resolve=async_response_of(OperationResponse_MppValidate)
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
async def evaluate_dfa( # pyright: ignore[reportIncompatibleMethodOverride]
|
|
188
|
+
self,
|
|
189
|
+
namespace: EvaluateDfaRequestNamespace,
|
|
190
|
+
id: str,
|
|
191
|
+
mpp_id: str,
|
|
192
|
+
*,
|
|
193
|
+
station_ids: typing.Sequence[str] | None = OMIT,
|
|
194
|
+
request_options: RequestOptions | None = None,
|
|
195
|
+
) -> AsyncOperation[OperationResponse_MppEvaluateDfa]:
|
|
196
|
+
"""Score the stations; see `PlanningApi.evaluate_dfa`."""
|
|
197
|
+
accepted = await super().evaluate_dfa(
|
|
198
|
+
namespace, id, mpp_id, station_ids=station_ids, request_options=request_options
|
|
199
|
+
)
|
|
200
|
+
return await self._operations.handle(
|
|
201
|
+
accepted, resolve=async_response_of(OperationResponse_MppEvaluateDfa)
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
async def adapt( # pyright: ignore[reportIncompatibleMethodOverride]
|
|
205
|
+
self,
|
|
206
|
+
namespace: AdaptRequestNamespace,
|
|
207
|
+
id: str,
|
|
208
|
+
*,
|
|
209
|
+
reference_mpp_id: str,
|
|
210
|
+
diff: DiffReport,
|
|
211
|
+
name: str | None = OMIT,
|
|
212
|
+
request_options: RequestOptions | None = None,
|
|
213
|
+
) -> AsyncOperation[OperationResponse_MppAdapt]:
|
|
214
|
+
"""Adapt a reference assembly's plan; see `PlanningApi.adapt`."""
|
|
215
|
+
accepted = await super().adapt(
|
|
216
|
+
namespace,
|
|
217
|
+
id,
|
|
218
|
+
reference_mpp_id=reference_mpp_id,
|
|
219
|
+
diff=diff,
|
|
220
|
+
name=name,
|
|
221
|
+
request_options=request_options,
|
|
222
|
+
)
|
|
223
|
+
return await self._operations.handle(
|
|
224
|
+
accepted, resolve=async_response_of(OperationResponse_MppAdapt)
|
|
225
|
+
)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
SDK_DEFAULT_TIMEOUT = 60
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
import httpx_aiohttp # type: ignore[import-not-found]
|
|
11
|
+
except ImportError:
|
|
12
|
+
|
|
13
|
+
class DefaultAioHttpClient(httpx.AsyncClient): # type: ignore
|
|
14
|
+
def __init__(self, **kwargs: typing.Any) -> None:
|
|
15
|
+
raise RuntimeError(
|
|
16
|
+
"To use the aiohttp client, install the aiohttp extra: pip install autoassembler[aiohttp]"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
else:
|
|
20
|
+
|
|
21
|
+
class DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore
|
|
22
|
+
def __init__(self, **kwargs: typing.Any) -> None:
|
|
23
|
+
kwargs.setdefault("timeout", SDK_DEFAULT_TIMEOUT)
|
|
24
|
+
kwargs.setdefault("follow_redirects", True)
|
|
25
|
+
super().__init__(**kwargs)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class DefaultAsyncHttpxClient(httpx.AsyncClient):
|
|
29
|
+
def __init__(self, **kwargs: typing.Any) -> None:
|
|
30
|
+
kwargs.setdefault("timeout", SDK_DEFAULT_TIMEOUT)
|
|
31
|
+
kwargs.setdefault("follow_redirects", True)
|
|
32
|
+
super().__init__(**kwargs)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"""Package and API versions — hand-written, protected via `.fernignore`."""
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import version
|
|
4
|
+
|
|
5
|
+
__version__ = version("autoassembler")
|
|
6
|
+
|
|
7
|
+
# The API major version this SDK is generated against (the vendored spec is the API's v4).
|
|
8
|
+
API_VERSION = "v4"
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from . import jobs, planning
|
|
10
|
+
from .jobs import CancelJobJobsResponse, ListJobsJobsResponse, ListJobsJobsResponsePagination, RetryJobJobsResponse
|
|
11
|
+
from .planning import (
|
|
12
|
+
ApplyOpsPlanningRequestNamespace,
|
|
13
|
+
ApplyOpsPlanningRequestOpsItem,
|
|
14
|
+
ApplyOpsPlanningRequestOpsItemOp,
|
|
15
|
+
ApplyOpsPlanningResponse,
|
|
16
|
+
)
|
|
17
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
18
|
+
"ApplyOpsPlanningRequestNamespace": ".planning",
|
|
19
|
+
"ApplyOpsPlanningRequestOpsItem": ".planning",
|
|
20
|
+
"ApplyOpsPlanningRequestOpsItemOp": ".planning",
|
|
21
|
+
"ApplyOpsPlanningResponse": ".planning",
|
|
22
|
+
"CancelJobJobsResponse": ".jobs",
|
|
23
|
+
"ListJobsJobsResponse": ".jobs",
|
|
24
|
+
"ListJobsJobsResponsePagination": ".jobs",
|
|
25
|
+
"RetryJobJobsResponse": ".jobs",
|
|
26
|
+
"jobs": ".jobs",
|
|
27
|
+
"planning": ".planning",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
32
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
33
|
+
if module_name is None:
|
|
34
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
35
|
+
try:
|
|
36
|
+
module = import_module(module_name, __package__)
|
|
37
|
+
if module_name == f".{attr_name}":
|
|
38
|
+
return module
|
|
39
|
+
else:
|
|
40
|
+
return getattr(module, attr_name)
|
|
41
|
+
except ImportError as e:
|
|
42
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
43
|
+
except AttributeError as e:
|
|
44
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def __dir__():
|
|
48
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
49
|
+
return sorted(lazy_attrs)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
__all__ = [
|
|
53
|
+
"ApplyOpsPlanningRequestNamespace",
|
|
54
|
+
"ApplyOpsPlanningRequestOpsItem",
|
|
55
|
+
"ApplyOpsPlanningRequestOpsItemOp",
|
|
56
|
+
"ApplyOpsPlanningResponse",
|
|
57
|
+
"CancelJobJobsResponse",
|
|
58
|
+
"ListJobsJobsResponse",
|
|
59
|
+
"ListJobsJobsResponsePagination",
|
|
60
|
+
"RetryJobJobsResponse",
|
|
61
|
+
"jobs",
|
|
62
|
+
"planning",
|
|
63
|
+
]
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
|
|
7
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
|
+
from .raw_client import AsyncRawAlphaClient, RawAlphaClient
|
|
9
|
+
|
|
10
|
+
if typing.TYPE_CHECKING:
|
|
11
|
+
from .jobs.client import AsyncJobsClient, JobsClient
|
|
12
|
+
from .planning.client import AsyncPlanningClient, PlanningClient
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class AlphaClient:
|
|
16
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
17
|
+
self._raw_client = RawAlphaClient(client_wrapper=client_wrapper)
|
|
18
|
+
self._client_wrapper = client_wrapper
|
|
19
|
+
self._jobs: typing.Optional[JobsClient] = None
|
|
20
|
+
self._planning: typing.Optional[PlanningClient] = None
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def with_raw_response(self) -> RawAlphaClient:
|
|
24
|
+
"""
|
|
25
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
26
|
+
|
|
27
|
+
Returns
|
|
28
|
+
-------
|
|
29
|
+
RawAlphaClient
|
|
30
|
+
"""
|
|
31
|
+
return self._raw_client
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def jobs(self):
|
|
35
|
+
if self._jobs is None:
|
|
36
|
+
from .jobs.client import JobsClient # noqa: E402
|
|
37
|
+
|
|
38
|
+
self._jobs = JobsClient(client_wrapper=self._client_wrapper)
|
|
39
|
+
return self._jobs
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def planning(self):
|
|
43
|
+
if self._planning is None:
|
|
44
|
+
from .planning.client import PlanningClient # noqa: E402
|
|
45
|
+
|
|
46
|
+
self._planning = PlanningClient(client_wrapper=self._client_wrapper)
|
|
47
|
+
return self._planning
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class AsyncAlphaClient:
|
|
51
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
52
|
+
self._raw_client = AsyncRawAlphaClient(client_wrapper=client_wrapper)
|
|
53
|
+
self._client_wrapper = client_wrapper
|
|
54
|
+
self._jobs: typing.Optional[AsyncJobsClient] = None
|
|
55
|
+
self._planning: typing.Optional[AsyncPlanningClient] = None
|
|
56
|
+
|
|
57
|
+
@property
|
|
58
|
+
def with_raw_response(self) -> AsyncRawAlphaClient:
|
|
59
|
+
"""
|
|
60
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
61
|
+
|
|
62
|
+
Returns
|
|
63
|
+
-------
|
|
64
|
+
AsyncRawAlphaClient
|
|
65
|
+
"""
|
|
66
|
+
return self._raw_client
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def jobs(self):
|
|
70
|
+
if self._jobs is None:
|
|
71
|
+
from .jobs.client import AsyncJobsClient # noqa: E402
|
|
72
|
+
|
|
73
|
+
self._jobs = AsyncJobsClient(client_wrapper=self._client_wrapper)
|
|
74
|
+
return self._jobs
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def planning(self):
|
|
78
|
+
if self._planning is None:
|
|
79
|
+
from .planning.client import AsyncPlanningClient # noqa: E402
|
|
80
|
+
|
|
81
|
+
self._planning = AsyncPlanningClient(client_wrapper=self._client_wrapper)
|
|
82
|
+
return self._planning
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .types import CancelJobJobsResponse, ListJobsJobsResponse, ListJobsJobsResponsePagination, RetryJobJobsResponse
|
|
10
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
11
|
+
"CancelJobJobsResponse": ".types",
|
|
12
|
+
"ListJobsJobsResponse": ".types",
|
|
13
|
+
"ListJobsJobsResponsePagination": ".types",
|
|
14
|
+
"RetryJobJobsResponse": ".types",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
19
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
20
|
+
if module_name is None:
|
|
21
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
22
|
+
try:
|
|
23
|
+
module = import_module(module_name, __package__)
|
|
24
|
+
if module_name == f".{attr_name}":
|
|
25
|
+
return module
|
|
26
|
+
else:
|
|
27
|
+
return getattr(module, attr_name)
|
|
28
|
+
except ImportError as e:
|
|
29
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
30
|
+
except AttributeError as e:
|
|
31
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def __dir__():
|
|
35
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
36
|
+
return sorted(lazy_attrs)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
__all__ = ["CancelJobJobsResponse", "ListJobsJobsResponse", "ListJobsJobsResponsePagination", "RetryJobJobsResponse"]
|