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.
Files changed (198) hide show
  1. autoassembler/.fernignore +7 -0
  2. autoassembler/__init__.py +537 -0
  3. autoassembler/_custom/__init__.py +56 -0
  4. autoassembler/_custom/assemblies.py +226 -0
  5. autoassembler/_custom/assemblies_api.py +188 -0
  6. autoassembler/_custom/credentials.py +248 -0
  7. autoassembler/_custom/http.py +42 -0
  8. autoassembler/_custom/operations.py +258 -0
  9. autoassembler/_custom/planning.py +598 -0
  10. autoassembler/_custom/planning_api.py +225 -0
  11. autoassembler/_default_clients.py +32 -0
  12. autoassembler/_version.py +8 -0
  13. autoassembler/alpha/__init__.py +63 -0
  14. autoassembler/alpha/client.py +82 -0
  15. autoassembler/alpha/jobs/__init__.py +39 -0
  16. autoassembler/alpha/jobs/client.py +338 -0
  17. autoassembler/alpha/jobs/raw_client.py +641 -0
  18. autoassembler/alpha/jobs/types/__init__.py +42 -0
  19. autoassembler/alpha/jobs/types/cancel_job_jobs_response.py +12 -0
  20. autoassembler/alpha/jobs/types/list_jobs_jobs_response.py +30 -0
  21. autoassembler/alpha/jobs/types/list_jobs_jobs_response_pagination.py +22 -0
  22. autoassembler/alpha/jobs/types/retry_job_jobs_response.py +16 -0
  23. autoassembler/alpha/planning/__init__.py +49 -0
  24. autoassembler/alpha/planning/client.py +201 -0
  25. autoassembler/alpha/planning/raw_client.py +268 -0
  26. autoassembler/alpha/planning/types/__init__.py +47 -0
  27. autoassembler/alpha/planning/types/apply_ops_planning_request_namespace.py +5 -0
  28. autoassembler/alpha/planning/types/apply_ops_planning_request_ops_item.py +13 -0
  29. autoassembler/alpha/planning/types/apply_ops_planning_request_ops_item_op.py +58 -0
  30. autoassembler/alpha/planning/types/apply_ops_planning_response.py +13 -0
  31. autoassembler/alpha/raw_client.py +13 -0
  32. autoassembler/assemblies/__init__.py +73 -0
  33. autoassembler/assemblies/client.py +1177 -0
  34. autoassembler/assemblies/raw_client.py +1557 -0
  35. autoassembler/assemblies/types/__init__.py +71 -0
  36. autoassembler/assemblies/types/delete_assembly_response.py +12 -0
  37. autoassembler/assemblies/types/download_assembly_cad_request_namespace.py +5 -0
  38. autoassembler/assemblies/types/get_assembly_info_request_namespace.py +5 -0
  39. autoassembler/assemblies/types/get_status_request_namespace.py +5 -0
  40. autoassembler/assemblies/types/get_status_response.py +16 -0
  41. autoassembler/assemblies/types/get_status_response_progress.py +13 -0
  42. autoassembler/assemblies/types/get_status_response_status.py +7 -0
  43. autoassembler/assemblies/types/get_structure_request_namespace.py +5 -0
  44. autoassembler/assemblies/types/list_assembly_versions_request_namespace.py +5 -0
  45. autoassembler/assemblies/types/list_connections_request_namespace.py +5 -0
  46. autoassembler/assemblies/types/process_request_namespace.py +5 -0
  47. autoassembler/assemblies/types/update_assembly_info_request_namespace.py +5 -0
  48. autoassembler/auth/__init__.py +34 -0
  49. autoassembler/auth/client.py +282 -0
  50. autoassembler/auth/raw_client.py +413 -0
  51. autoassembler/auth/types/__init__.py +36 -0
  52. autoassembler/auth/types/create_access_token_request_grant_type.py +7 -0
  53. autoassembler/base_client.py +328 -0
  54. autoassembler/client.py +262 -0
  55. autoassembler/core/__init__.py +127 -0
  56. autoassembler/core/api_error.py +23 -0
  57. autoassembler/core/client_wrapper.py +147 -0
  58. autoassembler/core/datetime_utils.py +70 -0
  59. autoassembler/core/file.py +67 -0
  60. autoassembler/core/force_multipart.py +18 -0
  61. autoassembler/core/http_client.py +965 -0
  62. autoassembler/core/http_response.py +63 -0
  63. autoassembler/core/http_sse/__init__.py +42 -0
  64. autoassembler/core/http_sse/_api.py +455 -0
  65. autoassembler/core/http_sse/_decoders.py +74 -0
  66. autoassembler/core/http_sse/_exceptions.py +7 -0
  67. autoassembler/core/http_sse/_models.py +17 -0
  68. autoassembler/core/jsonable_encoder.py +133 -0
  69. autoassembler/core/logging.py +107 -0
  70. autoassembler/core/parse_error.py +36 -0
  71. autoassembler/core/pydantic_utilities.py +486 -0
  72. autoassembler/core/query_encoder.py +58 -0
  73. autoassembler/core/remove_none_from_dict.py +11 -0
  74. autoassembler/core/request_options.py +40 -0
  75. autoassembler/core/serialization.py +347 -0
  76. autoassembler/environment.py +7 -0
  77. autoassembler/errors/__init__.py +56 -0
  78. autoassembler/errors/bad_request_error.py +10 -0
  79. autoassembler/errors/conflict_error.py +10 -0
  80. autoassembler/errors/forbidden_error.py +11 -0
  81. autoassembler/errors/internal_server_error.py +11 -0
  82. autoassembler/errors/not_found_error.py +11 -0
  83. autoassembler/errors/unauthorized_error.py +10 -0
  84. autoassembler/errors/unprocessable_entity_error.py +11 -0
  85. autoassembler/operation.py +196 -0
  86. autoassembler/operations/__init__.py +4 -0
  87. autoassembler/operations/client.py +209 -0
  88. autoassembler/operations/raw_client.py +343 -0
  89. autoassembler/planning/__init__.py +70 -0
  90. autoassembler/planning/client.py +1174 -0
  91. autoassembler/planning/raw_client.py +1349 -0
  92. autoassembler/planning/types/__init__.py +68 -0
  93. autoassembler/planning/types/adapt_request_namespace.py +5 -0
  94. autoassembler/planning/types/create_mpp_request_body.py +8 -0
  95. autoassembler/planning/types/create_mpp_request_namespace.py +5 -0
  96. autoassembler/planning/types/delete_mpp_request_namespace.py +5 -0
  97. autoassembler/planning/types/delete_mpp_response.py +12 -0
  98. autoassembler/planning/types/evaluate_dfa_request_namespace.py +5 -0
  99. autoassembler/planning/types/get_mpp_request_namespace.py +5 -0
  100. autoassembler/planning/types/get_mpp_response.py +27 -0
  101. autoassembler/planning/types/list_mpps_request_namespace.py +5 -0
  102. autoassembler/planning/types/plan_request_namespace.py +5 -0
  103. autoassembler/planning/types/validate_request_namespace.py +5 -0
  104. autoassembler/py.typed +0 -0
  105. autoassembler/sessions/__init__.py +4 -0
  106. autoassembler/sessions/client.py +102 -0
  107. autoassembler/sessions/raw_client.py +126 -0
  108. autoassembler/types/__init__.py +344 -0
  109. autoassembler/types/access_token_response.py +14 -0
  110. autoassembler/types/active_session.py +25 -0
  111. autoassembler/types/active_session_namespace.py +5 -0
  112. autoassembler/types/adapt_mpp_accepted.py +26 -0
  113. autoassembler/types/assembly.py +30 -0
  114. autoassembler/types/assembly_connection.py +21 -0
  115. autoassembler/types/assembly_connection_relationship.py +5 -0
  116. autoassembler/types/assembly_connections_response.py +13 -0
  117. autoassembler/types/assembly_diff_metadata.py +35 -0
  118. autoassembler/types/assembly_diff_response.py +34 -0
  119. autoassembler/types/assembly_info.py +36 -0
  120. autoassembler/types/assembly_json_response.py +15 -0
  121. autoassembler/types/assembly_process_metadata.py +32 -0
  122. autoassembler/types/assembly_process_response.py +18 -0
  123. autoassembler/types/assembly_search_hit.py +31 -0
  124. autoassembler/types/assembly_version_summary.py +27 -0
  125. autoassembler/types/conflict_error_body.py +19 -0
  126. autoassembler/types/conflict_error_body_error.py +5 -0
  127. autoassembler/types/create_mpp_request.py +13 -0
  128. autoassembler/types/device_authorization_response.py +17 -0
  129. autoassembler/types/diff_accepted.py +42 -0
  130. autoassembler/types/diff_context_node.py +20 -0
  131. autoassembler/types/diff_details.py +73 -0
  132. autoassembler/types/diff_error_response.py +38 -0
  133. autoassembler/types/diff_flags.py +74 -0
  134. autoassembler/types/diff_ml_semantics.py +55 -0
  135. autoassembler/types/diff_node.py +26 -0
  136. autoassembler/types/diff_node_pair_with_parts.py +90 -0
  137. autoassembler/types/diff_node_with_parent.py +15 -0
  138. autoassembler/types/diff_reference_target_nodes.py +25 -0
  139. autoassembler/types/diff_report.py +24 -0
  140. autoassembler/types/diff_rigid_alignment.py +30 -0
  141. autoassembler/types/diff_summary.py +121 -0
  142. autoassembler/types/diff_summary_assembly_labels.py +44 -0
  143. autoassembler/types/diff_summary_geometric_diffs.py +24 -0
  144. autoassembler/types/diff_summary_persistent_edges_congruence.py +24 -0
  145. autoassembler/types/diff_summary_persistent_edges_congruence_pose.py +24 -0
  146. autoassembler/types/diff_summary_persistent_nodes_congruence.py +24 -0
  147. autoassembler/types/diff_summary_persistent_nodes_congruence_pose.py +24 -0
  148. autoassembler/types/diff_summary_total_parts.py +24 -0
  149. autoassembler/types/diff_swap.py +65 -0
  150. autoassembler/types/diff_swap_confidence.py +5 -0
  151. autoassembler/types/diff_swap_group.py +92 -0
  152. autoassembler/types/diff_validation_issue.py +38 -0
  153. autoassembler/types/diff_validation_issue_severity.py +5 -0
  154. autoassembler/types/diff_validation_result.py +35 -0
  155. autoassembler/types/diff_warning.py +79 -0
  156. autoassembler/types/diff_warning_reason.py +18 -0
  157. autoassembler/types/diff_warning_severity.py +5 -0
  158. autoassembler/types/error_response.py +30 -0
  159. autoassembler/types/filter.py +19 -0
  160. autoassembler/types/filter_field.py +7 -0
  161. autoassembler/types/filter_operator.py +5 -0
  162. autoassembler/types/job.py +123 -0
  163. autoassembler/types/job_progress.py +24 -0
  164. autoassembler/types/job_status.py +5 -0
  165. autoassembler/types/list_operations_response.py +25 -0
  166. autoassembler/types/manufacturing_process_plan.py +57 -0
  167. autoassembler/types/mpp_adapt_metadata.py +48 -0
  168. autoassembler/types/mpp_adapt_response.py +22 -0
  169. autoassembler/types/mpp_evaluate_dfa_metadata.py +47 -0
  170. autoassembler/types/mpp_evaluate_dfa_response.py +22 -0
  171. autoassembler/types/mpp_plan_metadata.py +47 -0
  172. autoassembler/types/mpp_plan_response.py +22 -0
  173. autoassembler/types/mpp_summary.py +20 -0
  174. autoassembler/types/mpp_validate_metadata.py +47 -0
  175. autoassembler/types/mpp_validate_response.py +22 -0
  176. autoassembler/types/o_auth_error_response.py +14 -0
  177. autoassembler/types/o_auth_error_response_error.py +18 -0
  178. autoassembler/types/operation.py +27 -0
  179. autoassembler/types/operation_error.py +21 -0
  180. autoassembler/types/operation_metadata.py +148 -0
  181. autoassembler/types/operation_response.py +94 -0
  182. autoassembler/types/process_assembly_accepted.py +14 -0
  183. autoassembler/types/process_assembly_response.py +55 -0
  184. autoassembler/types/process_assembly_skipped.py +14 -0
  185. autoassembler/types/search_assemblies_response.py +14 -0
  186. autoassembler/types/seq_plan_accepted.py +24 -0
  187. autoassembler/types/sever.py +33 -0
  188. autoassembler/types/sever_kind.py +5 -0
  189. autoassembler/types/sever_source.py +5 -0
  190. autoassembler/types/sort.py +8 -0
  191. autoassembler/types/upload_response.py +19 -0
  192. autoassembler/types/user_info.py +19 -0
  193. autoassembler/types/user_info_response.py +23 -0
  194. autoassembler/types/user_info_response_providers.py +14 -0
  195. autoassembler-0.3.1.dist-info/METADATA +209 -0
  196. autoassembler-0.3.1.dist-info/RECORD +198 -0
  197. autoassembler-0.3.1.dist-info/WHEEL +4 -0
  198. autoassembler-0.3.1.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,1177 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from .. import core
6
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
7
+ from ..core.request_options import RequestOptions
8
+ from ..types.assembly import Assembly
9
+ from ..types.assembly_connections_response import AssemblyConnectionsResponse
10
+ from ..types.assembly_info import AssemblyInfo
11
+ from ..types.assembly_json_response import AssemblyJsonResponse
12
+ from ..types.assembly_version_summary import AssemblyVersionSummary
13
+ from ..types.diff_report import DiffReport
14
+ from ..types.filter import Filter
15
+ from ..types.process_assembly_response import ProcessAssemblyResponse
16
+ from ..types.search_assemblies_response import SearchAssembliesResponse
17
+ from ..types.sort import Sort
18
+ from ..types.upload_response import UploadResponse
19
+ from .raw_client import AsyncRawAssembliesClient, RawAssembliesClient
20
+ from .types.delete_assembly_response import DeleteAssemblyResponse
21
+ from .types.download_assembly_cad_request_namespace import DownloadAssemblyCadRequestNamespace
22
+ from .types.get_assembly_info_request_namespace import GetAssemblyInfoRequestNamespace
23
+ from .types.get_status_request_namespace import GetStatusRequestNamespace
24
+ from .types.get_status_response import GetStatusResponse
25
+ from .types.get_structure_request_namespace import GetStructureRequestNamespace
26
+ from .types.list_assembly_versions_request_namespace import ListAssemblyVersionsRequestNamespace
27
+ from .types.list_connections_request_namespace import ListConnectionsRequestNamespace
28
+ from .types.process_request_namespace import ProcessRequestNamespace
29
+ from .types.update_assembly_info_request_namespace import UpdateAssemblyInfoRequestNamespace
30
+
31
+ # this is used as the default value for optional parameters
32
+ OMIT = typing.cast(typing.Any, ...)
33
+
34
+
35
+ class AssembliesClient:
36
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
37
+ self._raw_client = RawAssembliesClient(client_wrapper=client_wrapper)
38
+
39
+ @property
40
+ def with_raw_response(self) -> RawAssembliesClient:
41
+ """
42
+ Retrieves a raw implementation of this client that returns raw responses.
43
+
44
+ Returns
45
+ -------
46
+ RawAssembliesClient
47
+ """
48
+ return self._raw_client
49
+
50
+ def upload(
51
+ self, *, file: typing.Optional[core.File] = OMIT, request_options: typing.Optional[RequestOptions] = None
52
+ ) -> UploadResponse:
53
+ """
54
+ Parameters
55
+ ----------
56
+ file : typing.Optional[core.File]
57
+ See core.File for more documentation
58
+
59
+ request_options : typing.Optional[RequestOptions]
60
+ Request-specific configuration.
61
+
62
+ Returns
63
+ -------
64
+ UploadResponse
65
+ Successful upload
66
+
67
+ Examples
68
+ --------
69
+ from autoassembler import AutoAssembler
70
+
71
+ client = AutoAssembler(
72
+ token="YOUR_TOKEN",
73
+ )
74
+ client.assemblies.upload()
75
+ """
76
+ _response = self._raw_client.upload(file=file, request_options=request_options)
77
+ return _response.data
78
+
79
+ def search(
80
+ self,
81
+ *,
82
+ offset: typing.Optional[int] = OMIT,
83
+ limit: typing.Optional[int] = OMIT,
84
+ filters: typing.Optional[typing.Sequence[Filter]] = OMIT,
85
+ sort: typing.Optional[Sort] = OMIT,
86
+ request_options: typing.Optional[RequestOptions] = None,
87
+ ) -> SearchAssembliesResponse:
88
+ """
89
+ Parameters
90
+ ----------
91
+ offset : typing.Optional[int]
92
+
93
+ limit : typing.Optional[int]
94
+
95
+ filters : typing.Optional[typing.Sequence[Filter]]
96
+
97
+ sort : typing.Optional[Sort]
98
+
99
+ request_options : typing.Optional[RequestOptions]
100
+ Request-specific configuration.
101
+
102
+ Returns
103
+ -------
104
+ SearchAssembliesResponse
105
+ Search results
106
+
107
+ Examples
108
+ --------
109
+ from autoassembler import AutoAssembler
110
+
111
+ client = AutoAssembler(
112
+ token="YOUR_TOKEN",
113
+ )
114
+ client.assemblies.search()
115
+ """
116
+ _response = self._raw_client.search(
117
+ offset=offset, limit=limit, filters=filters, sort=sort, request_options=request_options
118
+ )
119
+ return _response.data
120
+
121
+ def diff(
122
+ self,
123
+ *,
124
+ reference_id: str,
125
+ target_id: str,
126
+ context_n_hops: typing.Optional[int] = OMIT,
127
+ async_: typing.Optional[bool] = OMIT,
128
+ request_options: typing.Optional[RequestOptions] = None,
129
+ ) -> DiffReport:
130
+ """
131
+ Compares a baseline assembly (`referenceId`) with another assembly
132
+ revision (`targetId`) and returns a structured report describing what
133
+ changed.
134
+
135
+ Typical UI mapping:
136
+ - Use `summary` for aggregate counts and badges.
137
+ - Use `details.geomDiffNodes.reference` for parts present only in the baseline.
138
+ - Use `details.geomDiffNodes.target` for parts present only in the target.
139
+ - Use `details.movedPosePairs` for matching parts that changed position or orientation.
140
+ - Use `details.swaps` for likely replacements, swaps, or renamed parts.
141
+ - Treat `flags` as supporting metadata for explanations, filters, or diagnostics.
142
+
143
+ Set `async` to `true` to get `202` with the operation computing the diff
144
+ (AIP-151): poll `GET /api/v4/operations/{id}` until it is `done`, then fetch
145
+ `resultUrl` for the `DiffReport`.
146
+
147
+ **Deprecated:** calling without `async: true`, which blocks until the diff is
148
+ computed and answers `200` with the report, with a `Deprecation` header
149
+ (RFC 9745). Pass `async: true` and wait on the operation instead; a later
150
+ version will always answer `202`.
151
+
152
+ Parameters
153
+ ----------
154
+ reference_id : str
155
+ Baseline assembly ID.
156
+
157
+ target_id : str
158
+ Target assembly ID.
159
+
160
+ context_n_hops : typing.Optional[int]
161
+ Graph radius used to collect surviving parts that define each added, removed, or swapped part's liaison context.
162
+
163
+ async_ : typing.Optional[bool]
164
+ When true, queues the diff and returns 202 with the operation computing it. Omitting it (or `false`) is deprecated.
165
+
166
+ request_options : typing.Optional[RequestOptions]
167
+ Request-specific configuration.
168
+
169
+ Returns
170
+ -------
171
+ DiffReport
172
+ Deprecated: the diff report, when called without `async: true`. Pass `async: true` and wait on the operation instead.
173
+
174
+ Examples
175
+ --------
176
+ from autoassembler import AutoAssembler
177
+
178
+ client = AutoAssembler(
179
+ token="YOUR_TOKEN",
180
+ )
181
+ client.assemblies.diff(
182
+ reference_id="referenceId",
183
+ target_id="targetId",
184
+ )
185
+ """
186
+ _response = self._raw_client.diff(
187
+ reference_id=reference_id,
188
+ target_id=target_id,
189
+ context_n_hops=context_n_hops,
190
+ async_=async_,
191
+ request_options=request_options,
192
+ )
193
+ return _response.data
194
+
195
+ def delete_assembly(
196
+ self, id: str, *, request_options: typing.Optional[RequestOptions] = None
197
+ ) -> DeleteAssemblyResponse:
198
+ """
199
+ Parameters
200
+ ----------
201
+ id : str
202
+ Assembly ID.
203
+
204
+ request_options : typing.Optional[RequestOptions]
205
+ Request-specific configuration.
206
+
207
+ Returns
208
+ -------
209
+ DeleteAssemblyResponse
210
+ Assembly deleted successfully
211
+
212
+ Examples
213
+ --------
214
+ from autoassembler import AutoAssembler
215
+
216
+ client = AutoAssembler(
217
+ token="YOUR_TOKEN",
218
+ )
219
+ client.assemblies.delete_assembly(
220
+ id="id",
221
+ )
222
+ """
223
+ _response = self._raw_client.delete_assembly(id, request_options=request_options)
224
+ return _response.data
225
+
226
+ def process(
227
+ self,
228
+ namespace: ProcessRequestNamespace,
229
+ id: str,
230
+ *,
231
+ attributes: typing.Optional[typing.Dict[str, typing.Sequence[str]]] = OMIT,
232
+ force: typing.Optional[bool] = OMIT,
233
+ clear_cache: typing.Optional[bool] = OMIT,
234
+ request_options: typing.Optional[RequestOptions] = None,
235
+ ) -> ProcessAssemblyResponse:
236
+ """
237
+ Parameters
238
+ ----------
239
+ namespace : ProcessRequestNamespace
240
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
241
+
242
+ id : str
243
+ Assembly ID.
244
+
245
+ attributes : typing.Optional[typing.Dict[str, typing.Sequence[str]]]
246
+ Attribute patterns for marking occurrences during parsing. Keys are attribute names (e.g. `consolidated`); values are glob patterns.
247
+
248
+ force : typing.Optional[bool]
249
+ Force reprocessing even if already processed.
250
+
251
+ clear_cache : typing.Optional[bool]
252
+ Clear cached planning data for this assembly.
253
+
254
+ request_options : typing.Optional[RequestOptions]
255
+ Request-specific configuration.
256
+
257
+ Returns
258
+ -------
259
+ ProcessAssemblyResponse
260
+ Processing request accepted or skipped
261
+
262
+ Examples
263
+ --------
264
+ from autoassembler import AutoAssembler
265
+
266
+ client = AutoAssembler(
267
+ token="YOUR_TOKEN",
268
+ )
269
+ client.assemblies.process(
270
+ namespace="user",
271
+ id="id",
272
+ )
273
+ """
274
+ _response = self._raw_client.process(
275
+ namespace, id, attributes=attributes, force=force, clear_cache=clear_cache, request_options=request_options
276
+ )
277
+ return _response.data
278
+
279
+ def get_status(
280
+ self, namespace: GetStatusRequestNamespace, id: str, *, request_options: typing.Optional[RequestOptions] = None
281
+ ) -> GetStatusResponse:
282
+ """
283
+ Parameters
284
+ ----------
285
+ namespace : GetStatusRequestNamespace
286
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
287
+
288
+ id : str
289
+ Assembly ID.
290
+
291
+ request_options : typing.Optional[RequestOptions]
292
+ Request-specific configuration.
293
+
294
+ Returns
295
+ -------
296
+ GetStatusResponse
297
+ Current processing status of the assembly
298
+
299
+ Examples
300
+ --------
301
+ from autoassembler import AutoAssembler
302
+
303
+ client = AutoAssembler(
304
+ token="YOUR_TOKEN",
305
+ )
306
+ client.assemblies.get_status(
307
+ namespace="user",
308
+ id="id",
309
+ )
310
+ """
311
+ _response = self._raw_client.get_status(namespace, id, request_options=request_options)
312
+ return _response.data
313
+
314
+ def get_structure(
315
+ self,
316
+ namespace: GetStructureRequestNamespace,
317
+ id: str,
318
+ *,
319
+ request_options: typing.Optional[RequestOptions] = None,
320
+ ) -> AssemblyJsonResponse:
321
+ """
322
+ Parameters
323
+ ----------
324
+ namespace : GetStructureRequestNamespace
325
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
326
+
327
+ id : str
328
+ Assembly ID.
329
+
330
+ request_options : typing.Optional[RequestOptions]
331
+ Request-specific configuration.
332
+
333
+ Returns
334
+ -------
335
+ AssemblyJsonResponse
336
+ Assembly metadata and structure.
337
+
338
+ Examples
339
+ --------
340
+ from autoassembler import AutoAssembler
341
+
342
+ client = AutoAssembler(
343
+ token="YOUR_TOKEN",
344
+ )
345
+ client.assemblies.get_structure(
346
+ namespace="user",
347
+ id="id",
348
+ )
349
+ """
350
+ _response = self._raw_client.get_structure(namespace, id, request_options=request_options)
351
+ return _response.data
352
+
353
+ def list_connections(
354
+ self,
355
+ namespace: ListConnectionsRequestNamespace,
356
+ id: str,
357
+ *,
358
+ request_options: typing.Optional[RequestOptions] = None,
359
+ ) -> AssemblyConnectionsResponse:
360
+ """
361
+ Returns physical connections between occurrences. Each connection is a contact or interference relationship.
362
+
363
+ Parameters
364
+ ----------
365
+ namespace : ListConnectionsRequestNamespace
366
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
367
+
368
+ id : str
369
+ Assembly ID.
370
+
371
+ request_options : typing.Optional[RequestOptions]
372
+ Request-specific configuration.
373
+
374
+ Returns
375
+ -------
376
+ AssemblyConnectionsResponse
377
+ Assembly connections.
378
+
379
+ Examples
380
+ --------
381
+ from autoassembler import AutoAssembler
382
+
383
+ client = AutoAssembler(
384
+ token="YOUR_TOKEN",
385
+ )
386
+ client.assemblies.list_connections(
387
+ namespace="user",
388
+ id="id",
389
+ )
390
+ """
391
+ _response = self._raw_client.list_connections(namespace, id, request_options=request_options)
392
+ return _response.data
393
+
394
+ def get_assembly_info(
395
+ self,
396
+ namespace: GetAssemblyInfoRequestNamespace,
397
+ id: str,
398
+ *,
399
+ request_options: typing.Optional[RequestOptions] = None,
400
+ ) -> AssemblyInfo:
401
+ """
402
+ Parameters
403
+ ----------
404
+ namespace : GetAssemblyInfoRequestNamespace
405
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
406
+
407
+ id : str
408
+ Assembly ID.
409
+
410
+ request_options : typing.Optional[RequestOptions]
411
+ Request-specific configuration.
412
+
413
+ Returns
414
+ -------
415
+ AssemblyInfo
416
+ Assembly metadata fields.
417
+
418
+ Examples
419
+ --------
420
+ from autoassembler import AutoAssembler
421
+
422
+ client = AutoAssembler(
423
+ token="YOUR_TOKEN",
424
+ )
425
+ client.assemblies.get_assembly_info(
426
+ namespace="user",
427
+ id="id",
428
+ )
429
+ """
430
+ _response = self._raw_client.get_assembly_info(namespace, id, request_options=request_options)
431
+ return _response.data
432
+
433
+ def update_assembly_info(
434
+ self,
435
+ namespace: UpdateAssemblyInfoRequestNamespace,
436
+ id: str,
437
+ *,
438
+ name: typing.Optional[str] = OMIT,
439
+ request_options: typing.Optional[RequestOptions] = None,
440
+ ) -> Assembly:
441
+ """
442
+ Currently only `name` is writable.
443
+
444
+ Parameters
445
+ ----------
446
+ namespace : UpdateAssemblyInfoRequestNamespace
447
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
448
+
449
+ id : str
450
+ Assembly ID.
451
+
452
+ name : typing.Optional[str]
453
+
454
+ request_options : typing.Optional[RequestOptions]
455
+ Request-specific configuration.
456
+
457
+ Returns
458
+ -------
459
+ Assembly
460
+ Updated assembly record.
461
+
462
+ Examples
463
+ --------
464
+ from autoassembler import AutoAssembler
465
+
466
+ client = AutoAssembler(
467
+ token="YOUR_TOKEN",
468
+ )
469
+ client.assemblies.update_assembly_info(
470
+ namespace="user",
471
+ id="id",
472
+ )
473
+ """
474
+ _response = self._raw_client.update_assembly_info(namespace, id, name=name, request_options=request_options)
475
+ return _response.data
476
+
477
+ def list_assembly_versions(
478
+ self,
479
+ namespace: ListAssemblyVersionsRequestNamespace,
480
+ id: str,
481
+ *,
482
+ request_options: typing.Optional[RequestOptions] = None,
483
+ ) -> typing.List[AssemblyVersionSummary]:
484
+ """
485
+ Returns other assemblies that share this assembly's `externalId` (for example an Onshape document). Empty when `externalId` is unset.
486
+
487
+ Parameters
488
+ ----------
489
+ namespace : ListAssemblyVersionsRequestNamespace
490
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
491
+
492
+ id : str
493
+ Assembly ID.
494
+
495
+ request_options : typing.Optional[RequestOptions]
496
+ Request-specific configuration.
497
+
498
+ Returns
499
+ -------
500
+ typing.List[AssemblyVersionSummary]
501
+ Version list.
502
+
503
+ Examples
504
+ --------
505
+ from autoassembler import AutoAssembler
506
+
507
+ client = AutoAssembler(
508
+ token="YOUR_TOKEN",
509
+ )
510
+ client.assemblies.list_assembly_versions(
511
+ namespace="user",
512
+ id="id",
513
+ )
514
+ """
515
+ _response = self._raw_client.list_assembly_versions(namespace, id, request_options=request_options)
516
+ return _response.data
517
+
518
+ def download_assembly_cad(
519
+ self,
520
+ namespace: DownloadAssemblyCadRequestNamespace,
521
+ id: str,
522
+ *,
523
+ request_options: typing.Optional[RequestOptions] = None,
524
+ ) -> typing.Iterator[bytes]:
525
+ """
526
+ Parameters
527
+ ----------
528
+ namespace : DownloadAssemblyCadRequestNamespace
529
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
530
+
531
+ id : str
532
+ Assembly ID.
533
+
534
+ request_options : typing.Optional[RequestOptions]
535
+ Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
536
+
537
+ Returns
538
+ -------
539
+ typing.Iterator[bytes]
540
+ CAD file bytes (attachment download).
541
+
542
+ Examples
543
+ --------
544
+ from autoassembler import AutoAssembler
545
+
546
+ client = AutoAssembler(
547
+ token="YOUR_TOKEN",
548
+ )
549
+ client.assemblies.download_assembly_cad(
550
+ namespace="user",
551
+ id="id",
552
+ )
553
+ """
554
+ with self._raw_client.download_assembly_cad(namespace, id, request_options=request_options) as r:
555
+ yield from r.data
556
+
557
+
558
+ class AsyncAssembliesClient:
559
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
560
+ self._raw_client = AsyncRawAssembliesClient(client_wrapper=client_wrapper)
561
+
562
+ @property
563
+ def with_raw_response(self) -> AsyncRawAssembliesClient:
564
+ """
565
+ Retrieves a raw implementation of this client that returns raw responses.
566
+
567
+ Returns
568
+ -------
569
+ AsyncRawAssembliesClient
570
+ """
571
+ return self._raw_client
572
+
573
+ async def upload(
574
+ self, *, file: typing.Optional[core.File] = OMIT, request_options: typing.Optional[RequestOptions] = None
575
+ ) -> UploadResponse:
576
+ """
577
+ Parameters
578
+ ----------
579
+ file : typing.Optional[core.File]
580
+ See core.File for more documentation
581
+
582
+ request_options : typing.Optional[RequestOptions]
583
+ Request-specific configuration.
584
+
585
+ Returns
586
+ -------
587
+ UploadResponse
588
+ Successful upload
589
+
590
+ Examples
591
+ --------
592
+ import asyncio
593
+
594
+ from autoassembler import AsyncAutoAssembler
595
+
596
+ client = AsyncAutoAssembler(
597
+ token="YOUR_TOKEN",
598
+ )
599
+
600
+
601
+ async def main() -> None:
602
+ await client.assemblies.upload()
603
+
604
+
605
+ asyncio.run(main())
606
+ """
607
+ _response = await self._raw_client.upload(file=file, request_options=request_options)
608
+ return _response.data
609
+
610
+ async def search(
611
+ self,
612
+ *,
613
+ offset: typing.Optional[int] = OMIT,
614
+ limit: typing.Optional[int] = OMIT,
615
+ filters: typing.Optional[typing.Sequence[Filter]] = OMIT,
616
+ sort: typing.Optional[Sort] = OMIT,
617
+ request_options: typing.Optional[RequestOptions] = None,
618
+ ) -> SearchAssembliesResponse:
619
+ """
620
+ Parameters
621
+ ----------
622
+ offset : typing.Optional[int]
623
+
624
+ limit : typing.Optional[int]
625
+
626
+ filters : typing.Optional[typing.Sequence[Filter]]
627
+
628
+ sort : typing.Optional[Sort]
629
+
630
+ request_options : typing.Optional[RequestOptions]
631
+ Request-specific configuration.
632
+
633
+ Returns
634
+ -------
635
+ SearchAssembliesResponse
636
+ Search results
637
+
638
+ Examples
639
+ --------
640
+ import asyncio
641
+
642
+ from autoassembler import AsyncAutoAssembler
643
+
644
+ client = AsyncAutoAssembler(
645
+ token="YOUR_TOKEN",
646
+ )
647
+
648
+
649
+ async def main() -> None:
650
+ await client.assemblies.search()
651
+
652
+
653
+ asyncio.run(main())
654
+ """
655
+ _response = await self._raw_client.search(
656
+ offset=offset, limit=limit, filters=filters, sort=sort, request_options=request_options
657
+ )
658
+ return _response.data
659
+
660
+ async def diff(
661
+ self,
662
+ *,
663
+ reference_id: str,
664
+ target_id: str,
665
+ context_n_hops: typing.Optional[int] = OMIT,
666
+ async_: typing.Optional[bool] = OMIT,
667
+ request_options: typing.Optional[RequestOptions] = None,
668
+ ) -> DiffReport:
669
+ """
670
+ Compares a baseline assembly (`referenceId`) with another assembly
671
+ revision (`targetId`) and returns a structured report describing what
672
+ changed.
673
+
674
+ Typical UI mapping:
675
+ - Use `summary` for aggregate counts and badges.
676
+ - Use `details.geomDiffNodes.reference` for parts present only in the baseline.
677
+ - Use `details.geomDiffNodes.target` for parts present only in the target.
678
+ - Use `details.movedPosePairs` for matching parts that changed position or orientation.
679
+ - Use `details.swaps` for likely replacements, swaps, or renamed parts.
680
+ - Treat `flags` as supporting metadata for explanations, filters, or diagnostics.
681
+
682
+ Set `async` to `true` to get `202` with the operation computing the diff
683
+ (AIP-151): poll `GET /api/v4/operations/{id}` until it is `done`, then fetch
684
+ `resultUrl` for the `DiffReport`.
685
+
686
+ **Deprecated:** calling without `async: true`, which blocks until the diff is
687
+ computed and answers `200` with the report, with a `Deprecation` header
688
+ (RFC 9745). Pass `async: true` and wait on the operation instead; a later
689
+ version will always answer `202`.
690
+
691
+ Parameters
692
+ ----------
693
+ reference_id : str
694
+ Baseline assembly ID.
695
+
696
+ target_id : str
697
+ Target assembly ID.
698
+
699
+ context_n_hops : typing.Optional[int]
700
+ Graph radius used to collect surviving parts that define each added, removed, or swapped part's liaison context.
701
+
702
+ async_ : typing.Optional[bool]
703
+ When true, queues the diff and returns 202 with the operation computing it. Omitting it (or `false`) is deprecated.
704
+
705
+ request_options : typing.Optional[RequestOptions]
706
+ Request-specific configuration.
707
+
708
+ Returns
709
+ -------
710
+ DiffReport
711
+ Deprecated: the diff report, when called without `async: true`. Pass `async: true` and wait on the operation instead.
712
+
713
+ Examples
714
+ --------
715
+ import asyncio
716
+
717
+ from autoassembler import AsyncAutoAssembler
718
+
719
+ client = AsyncAutoAssembler(
720
+ token="YOUR_TOKEN",
721
+ )
722
+
723
+
724
+ async def main() -> None:
725
+ await client.assemblies.diff(
726
+ reference_id="referenceId",
727
+ target_id="targetId",
728
+ )
729
+
730
+
731
+ asyncio.run(main())
732
+ """
733
+ _response = await self._raw_client.diff(
734
+ reference_id=reference_id,
735
+ target_id=target_id,
736
+ context_n_hops=context_n_hops,
737
+ async_=async_,
738
+ request_options=request_options,
739
+ )
740
+ return _response.data
741
+
742
+ async def delete_assembly(
743
+ self, id: str, *, request_options: typing.Optional[RequestOptions] = None
744
+ ) -> DeleteAssemblyResponse:
745
+ """
746
+ Parameters
747
+ ----------
748
+ id : str
749
+ Assembly ID.
750
+
751
+ request_options : typing.Optional[RequestOptions]
752
+ Request-specific configuration.
753
+
754
+ Returns
755
+ -------
756
+ DeleteAssemblyResponse
757
+ Assembly deleted successfully
758
+
759
+ Examples
760
+ --------
761
+ import asyncio
762
+
763
+ from autoassembler import AsyncAutoAssembler
764
+
765
+ client = AsyncAutoAssembler(
766
+ token="YOUR_TOKEN",
767
+ )
768
+
769
+
770
+ async def main() -> None:
771
+ await client.assemblies.delete_assembly(
772
+ id="id",
773
+ )
774
+
775
+
776
+ asyncio.run(main())
777
+ """
778
+ _response = await self._raw_client.delete_assembly(id, request_options=request_options)
779
+ return _response.data
780
+
781
+ async def process(
782
+ self,
783
+ namespace: ProcessRequestNamespace,
784
+ id: str,
785
+ *,
786
+ attributes: typing.Optional[typing.Dict[str, typing.Sequence[str]]] = OMIT,
787
+ force: typing.Optional[bool] = OMIT,
788
+ clear_cache: typing.Optional[bool] = OMIT,
789
+ request_options: typing.Optional[RequestOptions] = None,
790
+ ) -> ProcessAssemblyResponse:
791
+ """
792
+ Parameters
793
+ ----------
794
+ namespace : ProcessRequestNamespace
795
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
796
+
797
+ id : str
798
+ Assembly ID.
799
+
800
+ attributes : typing.Optional[typing.Dict[str, typing.Sequence[str]]]
801
+ Attribute patterns for marking occurrences during parsing. Keys are attribute names (e.g. `consolidated`); values are glob patterns.
802
+
803
+ force : typing.Optional[bool]
804
+ Force reprocessing even if already processed.
805
+
806
+ clear_cache : typing.Optional[bool]
807
+ Clear cached planning data for this assembly.
808
+
809
+ request_options : typing.Optional[RequestOptions]
810
+ Request-specific configuration.
811
+
812
+ Returns
813
+ -------
814
+ ProcessAssemblyResponse
815
+ Processing request accepted or skipped
816
+
817
+ Examples
818
+ --------
819
+ import asyncio
820
+
821
+ from autoassembler import AsyncAutoAssembler
822
+
823
+ client = AsyncAutoAssembler(
824
+ token="YOUR_TOKEN",
825
+ )
826
+
827
+
828
+ async def main() -> None:
829
+ await client.assemblies.process(
830
+ namespace="user",
831
+ id="id",
832
+ )
833
+
834
+
835
+ asyncio.run(main())
836
+ """
837
+ _response = await self._raw_client.process(
838
+ namespace, id, attributes=attributes, force=force, clear_cache=clear_cache, request_options=request_options
839
+ )
840
+ return _response.data
841
+
842
+ async def get_status(
843
+ self, namespace: GetStatusRequestNamespace, id: str, *, request_options: typing.Optional[RequestOptions] = None
844
+ ) -> GetStatusResponse:
845
+ """
846
+ Parameters
847
+ ----------
848
+ namespace : GetStatusRequestNamespace
849
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
850
+
851
+ id : str
852
+ Assembly ID.
853
+
854
+ request_options : typing.Optional[RequestOptions]
855
+ Request-specific configuration.
856
+
857
+ Returns
858
+ -------
859
+ GetStatusResponse
860
+ Current processing status of the assembly
861
+
862
+ Examples
863
+ --------
864
+ import asyncio
865
+
866
+ from autoassembler import AsyncAutoAssembler
867
+
868
+ client = AsyncAutoAssembler(
869
+ token="YOUR_TOKEN",
870
+ )
871
+
872
+
873
+ async def main() -> None:
874
+ await client.assemblies.get_status(
875
+ namespace="user",
876
+ id="id",
877
+ )
878
+
879
+
880
+ asyncio.run(main())
881
+ """
882
+ _response = await self._raw_client.get_status(namespace, id, request_options=request_options)
883
+ return _response.data
884
+
885
+ async def get_structure(
886
+ self,
887
+ namespace: GetStructureRequestNamespace,
888
+ id: str,
889
+ *,
890
+ request_options: typing.Optional[RequestOptions] = None,
891
+ ) -> AssemblyJsonResponse:
892
+ """
893
+ Parameters
894
+ ----------
895
+ namespace : GetStructureRequestNamespace
896
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
897
+
898
+ id : str
899
+ Assembly ID.
900
+
901
+ request_options : typing.Optional[RequestOptions]
902
+ Request-specific configuration.
903
+
904
+ Returns
905
+ -------
906
+ AssemblyJsonResponse
907
+ Assembly metadata and structure.
908
+
909
+ Examples
910
+ --------
911
+ import asyncio
912
+
913
+ from autoassembler import AsyncAutoAssembler
914
+
915
+ client = AsyncAutoAssembler(
916
+ token="YOUR_TOKEN",
917
+ )
918
+
919
+
920
+ async def main() -> None:
921
+ await client.assemblies.get_structure(
922
+ namespace="user",
923
+ id="id",
924
+ )
925
+
926
+
927
+ asyncio.run(main())
928
+ """
929
+ _response = await self._raw_client.get_structure(namespace, id, request_options=request_options)
930
+ return _response.data
931
+
932
+ async def list_connections(
933
+ self,
934
+ namespace: ListConnectionsRequestNamespace,
935
+ id: str,
936
+ *,
937
+ request_options: typing.Optional[RequestOptions] = None,
938
+ ) -> AssemblyConnectionsResponse:
939
+ """
940
+ Returns physical connections between occurrences. Each connection is a contact or interference relationship.
941
+
942
+ Parameters
943
+ ----------
944
+ namespace : ListConnectionsRequestNamespace
945
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
946
+
947
+ id : str
948
+ Assembly ID.
949
+
950
+ request_options : typing.Optional[RequestOptions]
951
+ Request-specific configuration.
952
+
953
+ Returns
954
+ -------
955
+ AssemblyConnectionsResponse
956
+ Assembly connections.
957
+
958
+ Examples
959
+ --------
960
+ import asyncio
961
+
962
+ from autoassembler import AsyncAutoAssembler
963
+
964
+ client = AsyncAutoAssembler(
965
+ token="YOUR_TOKEN",
966
+ )
967
+
968
+
969
+ async def main() -> None:
970
+ await client.assemblies.list_connections(
971
+ namespace="user",
972
+ id="id",
973
+ )
974
+
975
+
976
+ asyncio.run(main())
977
+ """
978
+ _response = await self._raw_client.list_connections(namespace, id, request_options=request_options)
979
+ return _response.data
980
+
981
+ async def get_assembly_info(
982
+ self,
983
+ namespace: GetAssemblyInfoRequestNamespace,
984
+ id: str,
985
+ *,
986
+ request_options: typing.Optional[RequestOptions] = None,
987
+ ) -> AssemblyInfo:
988
+ """
989
+ Parameters
990
+ ----------
991
+ namespace : GetAssemblyInfoRequestNamespace
992
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
993
+
994
+ id : str
995
+ Assembly ID.
996
+
997
+ request_options : typing.Optional[RequestOptions]
998
+ Request-specific configuration.
999
+
1000
+ Returns
1001
+ -------
1002
+ AssemblyInfo
1003
+ Assembly metadata fields.
1004
+
1005
+ Examples
1006
+ --------
1007
+ import asyncio
1008
+
1009
+ from autoassembler import AsyncAutoAssembler
1010
+
1011
+ client = AsyncAutoAssembler(
1012
+ token="YOUR_TOKEN",
1013
+ )
1014
+
1015
+
1016
+ async def main() -> None:
1017
+ await client.assemblies.get_assembly_info(
1018
+ namespace="user",
1019
+ id="id",
1020
+ )
1021
+
1022
+
1023
+ asyncio.run(main())
1024
+ """
1025
+ _response = await self._raw_client.get_assembly_info(namespace, id, request_options=request_options)
1026
+ return _response.data
1027
+
1028
+ async def update_assembly_info(
1029
+ self,
1030
+ namespace: UpdateAssemblyInfoRequestNamespace,
1031
+ id: str,
1032
+ *,
1033
+ name: typing.Optional[str] = OMIT,
1034
+ request_options: typing.Optional[RequestOptions] = None,
1035
+ ) -> Assembly:
1036
+ """
1037
+ Currently only `name` is writable.
1038
+
1039
+ Parameters
1040
+ ----------
1041
+ namespace : UpdateAssemblyInfoRequestNamespace
1042
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
1043
+
1044
+ id : str
1045
+ Assembly ID.
1046
+
1047
+ name : typing.Optional[str]
1048
+
1049
+ request_options : typing.Optional[RequestOptions]
1050
+ Request-specific configuration.
1051
+
1052
+ Returns
1053
+ -------
1054
+ Assembly
1055
+ Updated assembly record.
1056
+
1057
+ Examples
1058
+ --------
1059
+ import asyncio
1060
+
1061
+ from autoassembler import AsyncAutoAssembler
1062
+
1063
+ client = AsyncAutoAssembler(
1064
+ token="YOUR_TOKEN",
1065
+ )
1066
+
1067
+
1068
+ async def main() -> None:
1069
+ await client.assemblies.update_assembly_info(
1070
+ namespace="user",
1071
+ id="id",
1072
+ )
1073
+
1074
+
1075
+ asyncio.run(main())
1076
+ """
1077
+ _response = await self._raw_client.update_assembly_info(
1078
+ namespace, id, name=name, request_options=request_options
1079
+ )
1080
+ return _response.data
1081
+
1082
+ async def list_assembly_versions(
1083
+ self,
1084
+ namespace: ListAssemblyVersionsRequestNamespace,
1085
+ id: str,
1086
+ *,
1087
+ request_options: typing.Optional[RequestOptions] = None,
1088
+ ) -> typing.List[AssemblyVersionSummary]:
1089
+ """
1090
+ Returns other assemblies that share this assembly's `externalId` (for example an Onshape document). Empty when `externalId` is unset.
1091
+
1092
+ Parameters
1093
+ ----------
1094
+ namespace : ListAssemblyVersionsRequestNamespace
1095
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
1096
+
1097
+ id : str
1098
+ Assembly ID.
1099
+
1100
+ request_options : typing.Optional[RequestOptions]
1101
+ Request-specific configuration.
1102
+
1103
+ Returns
1104
+ -------
1105
+ typing.List[AssemblyVersionSummary]
1106
+ Version list.
1107
+
1108
+ Examples
1109
+ --------
1110
+ import asyncio
1111
+
1112
+ from autoassembler import AsyncAutoAssembler
1113
+
1114
+ client = AsyncAutoAssembler(
1115
+ token="YOUR_TOKEN",
1116
+ )
1117
+
1118
+
1119
+ async def main() -> None:
1120
+ await client.assemblies.list_assembly_versions(
1121
+ namespace="user",
1122
+ id="id",
1123
+ )
1124
+
1125
+
1126
+ asyncio.run(main())
1127
+ """
1128
+ _response = await self._raw_client.list_assembly_versions(namespace, id, request_options=request_options)
1129
+ return _response.data
1130
+
1131
+ async def download_assembly_cad(
1132
+ self,
1133
+ namespace: DownloadAssemblyCadRequestNamespace,
1134
+ id: str,
1135
+ *,
1136
+ request_options: typing.Optional[RequestOptions] = None,
1137
+ ) -> typing.AsyncIterator[bytes]:
1138
+ """
1139
+ Parameters
1140
+ ----------
1141
+ namespace : DownloadAssemblyCadRequestNamespace
1142
+ Assembly URL namespace. `user`, `shared`, and `public` are routed through the same assembly lookup.
1143
+
1144
+ id : str
1145
+ Assembly ID.
1146
+
1147
+ request_options : typing.Optional[RequestOptions]
1148
+ Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
1149
+
1150
+ Returns
1151
+ -------
1152
+ typing.AsyncIterator[bytes]
1153
+ CAD file bytes (attachment download).
1154
+
1155
+ Examples
1156
+ --------
1157
+ import asyncio
1158
+
1159
+ from autoassembler import AsyncAutoAssembler
1160
+
1161
+ client = AsyncAutoAssembler(
1162
+ token="YOUR_TOKEN",
1163
+ )
1164
+
1165
+
1166
+ async def main() -> None:
1167
+ await client.assemblies.download_assembly_cad(
1168
+ namespace="user",
1169
+ id="id",
1170
+ )
1171
+
1172
+
1173
+ asyncio.run(main())
1174
+ """
1175
+ async with self._raw_client.download_assembly_cad(namespace, id, request_options=request_options) as r:
1176
+ async for _chunk in r.data:
1177
+ yield _chunk