Debian Codegraph @

src/anthropic/resources/beta/beta.py

raw
1 from __future__ import annotations
2
3 from .files import (
4 Files,
5 AsyncFiles,
6 FilesWithRawResponse,
7 AsyncFilesWithRawResponse,
8 FilesWithStreamingResponse,
9 AsyncFilesWithStreamingResponse,
10 )
11 from .dreams import (
12 Dreams,
13 AsyncDreams,
14 DreamsWithRawResponse,
15 AsyncDreamsWithRawResponse,
16 DreamsWithStreamingResponse,
17 AsyncDreamsWithStreamingResponse,
18 )
19 from .models import (
20 Models,
21 AsyncModels,
22 ModelsWithRawResponse,
23 AsyncModelsWithRawResponse,
24 ModelsWithStreamingResponse,
25 AsyncModelsWithStreamingResponse,
26 )
27 from .webhooks import Webhooks, AsyncWebhooks
28 from ..._compat import cached_property
29 from ..._resource import SyncAPIResource, AsyncAPIResource
30 from .deployments import (
31 Deployments,
32 AsyncDeployments,
33 DeploymentsWithRawResponse,
34 AsyncDeploymentsWithRawResponse,
35 DeploymentsWithStreamingResponse,
36 AsyncDeploymentsWithStreamingResponse,
37 )
38 from .agents.agents import (
39 Agents,
40 AsyncAgents,
41 AgentsWithRawResponse,
42 AsyncAgentsWithRawResponse,
43 AgentsWithStreamingResponse,
44 AsyncAgentsWithStreamingResponse,
45 )
46 from .skills.skills import (
47 Skills,
48 AsyncSkills,
49 SkillsWithRawResponse,
50 AsyncSkillsWithRawResponse,
51 SkillsWithStreamingResponse,
52 AsyncSkillsWithStreamingResponse,
53 )
54 from .user_profiles import (
55 UserProfiles,
56 AsyncUserProfiles,
57 UserProfilesWithRawResponse,
58 AsyncUserProfilesWithRawResponse,
59 UserProfilesWithStreamingResponse,
60 AsyncUserProfilesWithStreamingResponse,
61 )
62 from .vaults.vaults import (
63 Vaults,
64 AsyncVaults,
65 VaultsWithRawResponse,
66 AsyncVaultsWithRawResponse,
67 VaultsWithStreamingResponse,
68 AsyncVaultsWithStreamingResponse,
69 )
70 from .deployment_runs import (
71 DeploymentRuns,
72 AsyncDeploymentRuns,
73 DeploymentRunsWithRawResponse,
74 AsyncDeploymentRunsWithRawResponse,
75 DeploymentRunsWithStreamingResponse,
76 AsyncDeploymentRunsWithStreamingResponse,
77 )
78 from .tunnels.tunnels import (
79 Tunnels,
80 AsyncTunnels,
81 TunnelsWithRawResponse,
82 AsyncTunnelsWithRawResponse,
83 TunnelsWithStreamingResponse,
84 AsyncTunnelsWithStreamingResponse,
85 )
86 from .messages.messages import (
87 Messages,
88 AsyncMessages,
89 MessagesWithRawResponse,
90 AsyncMessagesWithRawResponse,
91 MessagesWithStreamingResponse,
92 AsyncMessagesWithStreamingResponse,
93 )
94 from .sessions.sessions import (
95 Sessions,
96 AsyncSessions,
97 SessionsWithRawResponse,
98 AsyncSessionsWithRawResponse,
99 SessionsWithStreamingResponse,
100 AsyncSessionsWithStreamingResponse,
101 )
102 from .environments.environments import (
103 Environments,
104 AsyncEnvironments,
105 EnvironmentsWithRawResponse,
106 AsyncEnvironmentsWithRawResponse,
107 EnvironmentsWithStreamingResponse,
108 AsyncEnvironmentsWithStreamingResponse,
109 )
110 from .organization.organization import (
111 Organization,
112 AsyncOrganization,
113 OrganizationWithRawResponse,
114 AsyncOrganizationWithRawResponse,
115 OrganizationWithStreamingResponse,
116 AsyncOrganizationWithStreamingResponse,
117 )
118 from .memory_stores.memory_stores import (
119 MemoryStores,
120 AsyncMemoryStores,
121 MemoryStoresWithRawResponse,
122 AsyncMemoryStoresWithRawResponse,
123 MemoryStoresWithStreamingResponse,
124 AsyncMemoryStoresWithStreamingResponse,
125 )
126
127 __all__ = ["Beta", "AsyncBeta"]
128
129
130 class Beta(SyncAPIResource):
131 @cached_property
132 def models(self) -> Models:
133 return Models(self._client)
134
135 @cached_property
136 def messages(self) -> Messages:
137 return Messages(self._client)
138
139 @cached_property
140 def agents(self) -> Agents:
141 return Agents(self._client)
142
143 @cached_property
144 def environments(self) -> Environments:
145 return Environments(self._client)
146
147 @cached_property
148 def sessions(self) -> Sessions:
149 return Sessions(self._client)
150
151 @cached_property
152 def deployments(self) -> Deployments:
153 return Deployments(self._client)
154
155 @cached_property
156 def deployment_runs(self) -> DeploymentRuns:
157 return DeploymentRuns(self._client)
158
159 @cached_property
160 def vaults(self) -> Vaults:
161 return Vaults(self._client)
162
163 @cached_property
164 def memory_stores(self) -> MemoryStores:
165 return MemoryStores(self._client)
166
167 @cached_property
168 def files(self) -> Files:
169 return Files(self._client)
170
171 @cached_property
172 def skills(self) -> Skills:
173 return Skills(self._client)
174
175 @cached_property
176 def webhooks(self) -> Webhooks:
177 return Webhooks(self._client)
178
179 @cached_property
180 def user_profiles(self) -> UserProfiles:
181 return UserProfiles(self._client)
182
183 @cached_property
184 def dreams(self) -> Dreams:
185 return Dreams(self._client)
186
187 @cached_property
188 def tunnels(self) -> Tunnels:
189 return Tunnels(self._client)
190
191 @cached_property
192 def organization(self) -> Organization:
193 return Organization(self._client)
194
195 @cached_property
196 def with_raw_response(self) -> BetaWithRawResponse:
197 """
198 This property can be used as a prefix for any HTTP method call to return
199 the raw response object instead of the parsed content.
200
201 For more information, see https://www.github.com/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers
202 """
203 return BetaWithRawResponse(self)
204
205 @cached_property
206 def with_streaming_response(self) -> BetaWithStreamingResponse:
207 """
208 An alternative to `.with_raw_response` that doesn't eagerly read the response body.
209
210 For more information, see https://www.github.com/anthropics/anthropic-sdk-python#with_streaming_response
211 """
212 return BetaWithStreamingResponse(self)
213
214
215 class AsyncBeta(AsyncAPIResource):
216 @cached_property
217 def models(self) -> AsyncModels:
218 return AsyncModels(self._client)
219
220 @cached_property
221 def messages(self) -> AsyncMessages:
222 return AsyncMessages(self._client)
223
224 @cached_property
225 def agents(self) -> AsyncAgents:
226 return AsyncAgents(self._client)
227
228 @cached_property
229 def environments(self) -> AsyncEnvironments:
230 return AsyncEnvironments(self._client)
231
232 @cached_property
233 def sessions(self) -> AsyncSessions:
234 return AsyncSessions(self._client)
235
236 @cached_property
237 def deployments(self) -> AsyncDeployments:
238 return AsyncDeployments(self._client)
239
240 @cached_property
241 def deployment_runs(self) -> AsyncDeploymentRuns:
242 return AsyncDeploymentRuns(self._client)
243
244 @cached_property
245 def vaults(self) -> AsyncVaults:
246 return AsyncVaults(self._client)
247
248 @cached_property
249 def memory_stores(self) -> AsyncMemoryStores:
250 return AsyncMemoryStores(self._client)
251
252 @cached_property
253 def files(self) -> AsyncFiles:
254 return AsyncFiles(self._client)
255
256 @cached_property
257 def skills(self) -> AsyncSkills:
258 return AsyncSkills(self._client)
259
260 @cached_property
261 def webhooks(self) -> AsyncWebhooks:
262 return AsyncWebhooks(self._client)
263
264 @cached_property
265 def user_profiles(self) -> AsyncUserProfiles:
266 return AsyncUserProfiles(self._client)
267
268 @cached_property
269 def dreams(self) -> AsyncDreams:
270 return AsyncDreams(self._client)
271
272 @cached_property
273 def tunnels(self) -> AsyncTunnels:
274 return AsyncTunnels(self._client)
275
276 @cached_property
277 def organization(self) -> AsyncOrganization:
278 return AsyncOrganization(self._client)
279
280 @cached_property
281 def with_raw_response(self) -> AsyncBetaWithRawResponse:
282 """
283 This property can be used as a prefix for any HTTP method call to return
284 the raw response object instead of the parsed content.
285
286 For more information, see https://www.github.com/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers
287 """
288 return AsyncBetaWithRawResponse(self)
289
290 @cached_property
291 def with_streaming_response(self) -> AsyncBetaWithStreamingResponse:
292 """
293 An alternative to `.with_raw_response` that doesn't eagerly read the response body.
294
295 For more information, see https://www.github.com/anthropics/anthropic-sdk-python#with_streaming_response
296 """
297 return AsyncBetaWithStreamingResponse(self)
298
299
300 class BetaWithRawResponse:
301 def __init__(self, beta: Beta) -> None:
302 self._beta = beta
303
304 @cached_property
305 def models(self) -> ModelsWithRawResponse:
306 return ModelsWithRawResponse(self._beta.models)
307
308 @cached_property
309 def messages(self) -> MessagesWithRawResponse:
310 return MessagesWithRawResponse(self._beta.messages)
311
312 @cached_property
313 def agents(self) -> AgentsWithRawResponse:
314 return AgentsWithRawResponse(self._beta.agents)
315
316 @cached_property
317 def environments(self) -> EnvironmentsWithRawResponse:
318 return EnvironmentsWithRawResponse(self._beta.environments)
319
320 @cached_property
321 def sessions(self) -> SessionsWithRawResponse:
322 return SessionsWithRawResponse(self._beta.sessions)
323
324 @cached_property
325 def deployments(self) -> DeploymentsWithRawResponse:
326 return DeploymentsWithRawResponse(self._beta.deployments)
327
328 @cached_property
329 def deployment_runs(self) -> DeploymentRunsWithRawResponse:
330 return DeploymentRunsWithRawResponse(self._beta.deployment_runs)
331
332 @cached_property
333 def vaults(self) -> VaultsWithRawResponse:
334 return VaultsWithRawResponse(self._beta.vaults)
335
336 @cached_property
337 def memory_stores(self) -> MemoryStoresWithRawResponse:
338 return MemoryStoresWithRawResponse(self._beta.memory_stores)
339
340 @cached_property
341 def files(self) -> FilesWithRawResponse:
342 return FilesWithRawResponse(self._beta.files)
343
344 @cached_property
345 def skills(self) -> SkillsWithRawResponse:
346 return SkillsWithRawResponse(self._beta.skills)
347
348 @cached_property
349 def user_profiles(self) -> UserProfilesWithRawResponse:
350 return UserProfilesWithRawResponse(self._beta.user_profiles)
351
352 @cached_property
353 def dreams(self) -> DreamsWithRawResponse:
354 return DreamsWithRawResponse(self._beta.dreams)
355
356 @cached_property
357 def tunnels(self) -> TunnelsWithRawResponse:
358 return TunnelsWithRawResponse(self._beta.tunnels)
359
360 @cached_property
361 def organization(self) -> OrganizationWithRawResponse:
362 return OrganizationWithRawResponse(self._beta.organization)
363
364
365 class AsyncBetaWithRawResponse:
366 def __init__(self, beta: AsyncBeta) -> None:
367 self._beta = beta
368
369 @cached_property
370 def models(self) -> AsyncModelsWithRawResponse:
371 return AsyncModelsWithRawResponse(self._beta.models)
372
373 @cached_property
374 def messages(self) -> AsyncMessagesWithRawResponse:
375 return AsyncMessagesWithRawResponse(self._beta.messages)
376
377 @cached_property
378 def agents(self) -> AsyncAgentsWithRawResponse:
379 return AsyncAgentsWithRawResponse(self._beta.agents)
380
381 @cached_property
382 def environments(self) -> AsyncEnvironmentsWithRawResponse:
383 return AsyncEnvironmentsWithRawResponse(self._beta.environments)
384
385 @cached_property
386 def sessions(self) -> AsyncSessionsWithRawResponse:
387 return AsyncSessionsWithRawResponse(self._beta.sessions)
388
389 @cached_property
390 def deployments(self) -> AsyncDeploymentsWithRawResponse:
391 return AsyncDeploymentsWithRawResponse(self._beta.deployments)
392
393 @cached_property
394 def deployment_runs(self) -> AsyncDeploymentRunsWithRawResponse:
395 return AsyncDeploymentRunsWithRawResponse(self._beta.deployment_runs)
396
397 @cached_property
398 def vaults(self) -> AsyncVaultsWithRawResponse:
399 return AsyncVaultsWithRawResponse(self._beta.vaults)
400
401 @cached_property
402 def memory_stores(self) -> AsyncMemoryStoresWithRawResponse:
403 return AsyncMemoryStoresWithRawResponse(self._beta.memory_stores)
404
405 @cached_property
406 def files(self) -> AsyncFilesWithRawResponse:
407 return AsyncFilesWithRawResponse(self._beta.files)
408
409 @cached_property
410 def skills(self) -> AsyncSkillsWithRawResponse:
411 return AsyncSkillsWithRawResponse(self._beta.skills)
412
413 @cached_property
414 def user_profiles(self) -> AsyncUserProfilesWithRawResponse:
415 return AsyncUserProfilesWithRawResponse(self._beta.user_profiles)
416
417 @cached_property
418 def dreams(self) -> AsyncDreamsWithRawResponse:
419 return AsyncDreamsWithRawResponse(self._beta.dreams)
420
421 @cached_property
422 def tunnels(self) -> AsyncTunnelsWithRawResponse:
423 return AsyncTunnelsWithRawResponse(self._beta.tunnels)
424
425 @cached_property
426 def organization(self) -> AsyncOrganizationWithRawResponse:
427 return AsyncOrganizationWithRawResponse(self._beta.organization)
428
429
430 class BetaWithStreamingResponse:
431 def __init__(self, beta: Beta) -> None:
432 self._beta = beta
433
434 @cached_property
435 def models(self) -> ModelsWithStreamingResponse:
436 return ModelsWithStreamingResponse(self._beta.models)
437
438 @cached_property
439 def messages(self) -> MessagesWithStreamingResponse:
440 return MessagesWithStreamingResponse(self._beta.messages)
441
442 @cached_property
443 def agents(self) -> AgentsWithStreamingResponse:
444 return AgentsWithStreamingResponse(self._beta.agents)
445
446 @cached_property
447 def environments(self) -> EnvironmentsWithStreamingResponse:
448 return EnvironmentsWithStreamingResponse(self._beta.environments)
449
450 @cached_property
451 def sessions(self) -> SessionsWithStreamingResponse:
452 return SessionsWithStreamingResponse(self._beta.sessions)
453
454 @cached_property
455 def deployments(self) -> DeploymentsWithStreamingResponse:
456 return DeploymentsWithStreamingResponse(self._beta.deployments)
457
458 @cached_property
459 def deployment_runs(self) -> DeploymentRunsWithStreamingResponse:
460 return DeploymentRunsWithStreamingResponse(self._beta.deployment_runs)
461
462 @cached_property
463 def vaults(self) -> VaultsWithStreamingResponse:
464 return VaultsWithStreamingResponse(self._beta.vaults)
465
466 @cached_property
467 def memory_stores(self) -> MemoryStoresWithStreamingResponse:
468 return MemoryStoresWithStreamingResponse(self._beta.memory_stores)
469
470 @cached_property
471 def files(self) -> FilesWithStreamingResponse:
472 return FilesWithStreamingResponse(self._beta.files)
473
474 @cached_property
475 def skills(self) -> SkillsWithStreamingResponse:
476 return SkillsWithStreamingResponse(self._beta.skills)
477
478 @cached_property
479 def user_profiles(self) -> UserProfilesWithStreamingResponse:
480 return UserProfilesWithStreamingResponse(self._beta.user_profiles)
481
482 @cached_property
483 def dreams(self) -> DreamsWithStreamingResponse:
484 return DreamsWithStreamingResponse(self._beta.dreams)
485
486 @cached_property
487 def tunnels(self) -> TunnelsWithStreamingResponse:
488 return TunnelsWithStreamingResponse(self._beta.tunnels)
489
490 @cached_property
491 def organization(self) -> OrganizationWithStreamingResponse:
492 return OrganizationWithStreamingResponse(self._beta.organization)
493
494
495 class AsyncBetaWithStreamingResponse:
496 def __init__(self, beta: AsyncBeta) -> None:
497 self._beta = beta
498
499 @cached_property
500 def models(self) -> AsyncModelsWithStreamingResponse:
501 return AsyncModelsWithStreamingResponse(self._beta.models)
502
503 @cached_property
504 def messages(self) -> AsyncMessagesWithStreamingResponse:
505 return AsyncMessagesWithStreamingResponse(self._beta.messages)
506
507 @cached_property
508 def agents(self) -> AsyncAgentsWithStreamingResponse:
509 return AsyncAgentsWithStreamingResponse(self._beta.agents)
510
511 @cached_property
512 def environments(self) -> AsyncEnvironmentsWithStreamingResponse:
513 return AsyncEnvironmentsWithStreamingResponse(self._beta.environments)
514
515 @cached_property
516 def sessions(self) -> AsyncSessionsWithStreamingResponse:
517 return AsyncSessionsWithStreamingResponse(self._beta.sessions)
518
519 @cached_property
520 def deployments(self) -> AsyncDeploymentsWithStreamingResponse:
521 return AsyncDeploymentsWithStreamingResponse(self._beta.deployments)
522
523 @cached_property
524 def deployment_runs(self) -> AsyncDeploymentRunsWithStreamingResponse:
525 return AsyncDeploymentRunsWithStreamingResponse(self._beta.deployment_runs)
526
527 @cached_property
528 def vaults(self) -> AsyncVaultsWithStreamingResponse:
529 return AsyncVaultsWithStreamingResponse(self._beta.vaults)
530
531 @cached_property
532 def memory_stores(self) -> AsyncMemoryStoresWithStreamingResponse:
533 return AsyncMemoryStoresWithStreamingResponse(self._beta.memory_stores)
534
535 @cached_property
536 def files(self) -> AsyncFilesWithStreamingResponse:
537 return AsyncFilesWithStreamingResponse(self._beta.files)
538
539 @cached_property
540 def skills(self) -> AsyncSkillsWithStreamingResponse:
541 return AsyncSkillsWithStreamingResponse(self._beta.skills)
542
543 @cached_property
544 def user_profiles(self) -> AsyncUserProfilesWithStreamingResponse:
545 return AsyncUserProfilesWithStreamingResponse(self._beta.user_profiles)
546
547 @cached_property
548 def dreams(self) -> AsyncDreamsWithStreamingResponse:
549 return AsyncDreamsWithStreamingResponse(self._beta.dreams)
550
551 @cached_property
552 def tunnels(self) -> AsyncTunnelsWithStreamingResponse:
553 return AsyncTunnelsWithStreamingResponse(self._beta.tunnels)
554
555 @cached_property
556 def organization(self) -> AsyncOrganizationWithStreamingResponse:
557 return AsyncOrganizationWithStreamingResponse(self._beta.organization)