anchorbrowser 0.1.0__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 (100) hide show
  1. anchorbrowser/__init__.py +100 -0
  2. anchorbrowser/_base_client.py +1995 -0
  3. anchorbrowser/_client.py +440 -0
  4. anchorbrowser/_compat.py +219 -0
  5. anchorbrowser/_constants.py +14 -0
  6. anchorbrowser/_exceptions.py +108 -0
  7. anchorbrowser/_files.py +123 -0
  8. anchorbrowser/_models.py +829 -0
  9. anchorbrowser/_qs.py +150 -0
  10. anchorbrowser/_resource.py +43 -0
  11. anchorbrowser/_response.py +832 -0
  12. anchorbrowser/_streaming.py +333 -0
  13. anchorbrowser/_types.py +219 -0
  14. anchorbrowser/_utils/__init__.py +57 -0
  15. anchorbrowser/_utils/_logs.py +25 -0
  16. anchorbrowser/_utils/_proxy.py +65 -0
  17. anchorbrowser/_utils/_reflection.py +42 -0
  18. anchorbrowser/_utils/_resources_proxy.py +24 -0
  19. anchorbrowser/_utils/_streams.py +12 -0
  20. anchorbrowser/_utils/_sync.py +86 -0
  21. anchorbrowser/_utils/_transform.py +447 -0
  22. anchorbrowser/_utils/_typing.py +151 -0
  23. anchorbrowser/_utils/_utils.py +422 -0
  24. anchorbrowser/_version.py +4 -0
  25. anchorbrowser/lib/.keep +4 -0
  26. anchorbrowser/lib/agent.py +69 -0
  27. anchorbrowser/lib/browser.py +186 -0
  28. anchorbrowser/py.typed +0 -0
  29. anchorbrowser/resources/__init__.py +61 -0
  30. anchorbrowser/resources/agent.py +305 -0
  31. anchorbrowser/resources/browser.py +152 -0
  32. anchorbrowser/resources/extensions.py +412 -0
  33. anchorbrowser/resources/profiles.py +553 -0
  34. anchorbrowser/resources/sessions/__init__.py +89 -0
  35. anchorbrowser/resources/sessions/all.py +192 -0
  36. anchorbrowser/resources/sessions/clipboard.py +252 -0
  37. anchorbrowser/resources/sessions/keyboard.py +298 -0
  38. anchorbrowser/resources/sessions/mouse.py +651 -0
  39. anchorbrowser/resources/sessions/recordings/__init__.py +33 -0
  40. anchorbrowser/resources/sessions/recordings/primary.py +176 -0
  41. anchorbrowser/resources/sessions/recordings/recordings.py +357 -0
  42. anchorbrowser/resources/sessions/sessions.py +1122 -0
  43. anchorbrowser/resources/tools.py +529 -0
  44. anchorbrowser/types/__init__.py +32 -0
  45. anchorbrowser/types/extension_delete_response.py +12 -0
  46. anchorbrowser/types/extension_list_response.py +31 -0
  47. anchorbrowser/types/extension_manifest.py +28 -0
  48. anchorbrowser/types/extension_retrieve_response.py +27 -0
  49. anchorbrowser/types/extension_upload_params.py +17 -0
  50. anchorbrowser/types/extension_upload_response.py +31 -0
  51. anchorbrowser/types/profile_create_params.py +31 -0
  52. anchorbrowser/types/profile_list_response.py +43 -0
  53. anchorbrowser/types/profile_retrieve_response.py +36 -0
  54. anchorbrowser/types/profile_update_params.py +27 -0
  55. anchorbrowser/types/session_copy_response.py +12 -0
  56. anchorbrowser/types/session_create_params.py +196 -0
  57. anchorbrowser/types/session_create_response.py +22 -0
  58. anchorbrowser/types/session_drag_and_drop_params.py +26 -0
  59. anchorbrowser/types/session_drag_and_drop_response.py +11 -0
  60. anchorbrowser/types/session_goto_params.py +12 -0
  61. anchorbrowser/types/session_goto_response.py +11 -0
  62. anchorbrowser/types/session_paste_params.py +12 -0
  63. anchorbrowser/types/session_paste_response.py +11 -0
  64. anchorbrowser/types/session_retrieve_downloads_response.py +51 -0
  65. anchorbrowser/types/session_scroll_params.py +26 -0
  66. anchorbrowser/types/session_scroll_response.py +11 -0
  67. anchorbrowser/types/sessions/__init__.py +25 -0
  68. anchorbrowser/types/sessions/all_status_response.py +30 -0
  69. anchorbrowser/types/sessions/clipboard_get_response.py +16 -0
  70. anchorbrowser/types/sessions/clipboard_set_params.py +12 -0
  71. anchorbrowser/types/sessions/clipboard_set_response.py +11 -0
  72. anchorbrowser/types/sessions/keyboard_shortcut_params.py +18 -0
  73. anchorbrowser/types/sessions/keyboard_shortcut_response.py +11 -0
  74. anchorbrowser/types/sessions/keyboard_type_params.py +15 -0
  75. anchorbrowser/types/sessions/keyboard_type_response.py +11 -0
  76. anchorbrowser/types/sessions/mouse_click_params.py +18 -0
  77. anchorbrowser/types/sessions/mouse_click_response.py +11 -0
  78. anchorbrowser/types/sessions/mouse_double_click_params.py +18 -0
  79. anchorbrowser/types/sessions/mouse_double_click_response.py +11 -0
  80. anchorbrowser/types/sessions/mouse_down_params.py +18 -0
  81. anchorbrowser/types/sessions/mouse_down_response.py +11 -0
  82. anchorbrowser/types/sessions/mouse_move_params.py +15 -0
  83. anchorbrowser/types/sessions/mouse_move_response.py +11 -0
  84. anchorbrowser/types/sessions/mouse_up_params.py +18 -0
  85. anchorbrowser/types/sessions/mouse_up_response.py +11 -0
  86. anchorbrowser/types/sessions/recording_list_response.py +46 -0
  87. anchorbrowser/types/sessions/recording_pause_response.py +12 -0
  88. anchorbrowser/types/sessions/recording_resume_response.py +12 -0
  89. anchorbrowser/types/sessions/recordings/__init__.py +3 -0
  90. anchorbrowser/types/shared/__init__.py +3 -0
  91. anchorbrowser/types/shared/success_response.py +15 -0
  92. anchorbrowser/types/tool_fetch_webpage_params.py +26 -0
  93. anchorbrowser/types/tool_fetch_webpage_response.py +7 -0
  94. anchorbrowser/types/tool_perform_web_task_params.py +30 -0
  95. anchorbrowser/types/tool_perform_web_task_response.py +16 -0
  96. anchorbrowser/types/tool_screenshot_webpage_params.py +48 -0
  97. anchorbrowser-0.1.0.dist-info/METADATA +449 -0
  98. anchorbrowser-0.1.0.dist-info/RECORD +100 -0
  99. anchorbrowser-0.1.0.dist-info/WHEEL +4 -0
  100. anchorbrowser-0.1.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,1122 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal
6
+
7
+ import httpx
8
+
9
+ from .all import (
10
+ AllResource,
11
+ AsyncAllResource,
12
+ AllResourceWithRawResponse,
13
+ AsyncAllResourceWithRawResponse,
14
+ AllResourceWithStreamingResponse,
15
+ AsyncAllResourceWithStreamingResponse,
16
+ )
17
+ from .mouse import (
18
+ MouseResource,
19
+ AsyncMouseResource,
20
+ MouseResourceWithRawResponse,
21
+ AsyncMouseResourceWithRawResponse,
22
+ MouseResourceWithStreamingResponse,
23
+ AsyncMouseResourceWithStreamingResponse,
24
+ )
25
+ from ...types import (
26
+ session_goto_params,
27
+ session_paste_params,
28
+ session_create_params,
29
+ session_scroll_params,
30
+ session_drag_and_drop_params,
31
+ )
32
+ from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
33
+ from ..._utils import maybe_transform, async_maybe_transform
34
+ from .keyboard import (
35
+ KeyboardResource,
36
+ AsyncKeyboardResource,
37
+ KeyboardResourceWithRawResponse,
38
+ AsyncKeyboardResourceWithRawResponse,
39
+ KeyboardResourceWithStreamingResponse,
40
+ AsyncKeyboardResourceWithStreamingResponse,
41
+ )
42
+ from ..._compat import cached_property
43
+ from .clipboard import (
44
+ ClipboardResource,
45
+ AsyncClipboardResource,
46
+ ClipboardResourceWithRawResponse,
47
+ AsyncClipboardResourceWithRawResponse,
48
+ ClipboardResourceWithStreamingResponse,
49
+ AsyncClipboardResourceWithStreamingResponse,
50
+ )
51
+ from ..._resource import SyncAPIResource, AsyncAPIResource
52
+ from ..._response import (
53
+ BinaryAPIResponse,
54
+ AsyncBinaryAPIResponse,
55
+ StreamedBinaryAPIResponse,
56
+ AsyncStreamedBinaryAPIResponse,
57
+ to_raw_response_wrapper,
58
+ to_streamed_response_wrapper,
59
+ async_to_raw_response_wrapper,
60
+ to_custom_raw_response_wrapper,
61
+ async_to_streamed_response_wrapper,
62
+ to_custom_streamed_response_wrapper,
63
+ async_to_custom_raw_response_wrapper,
64
+ async_to_custom_streamed_response_wrapper,
65
+ )
66
+ from ..._base_client import make_request_options
67
+ from .recordings.recordings import (
68
+ RecordingsResource,
69
+ AsyncRecordingsResource,
70
+ RecordingsResourceWithRawResponse,
71
+ AsyncRecordingsResourceWithRawResponse,
72
+ RecordingsResourceWithStreamingResponse,
73
+ AsyncRecordingsResourceWithStreamingResponse,
74
+ )
75
+ from ...types.session_copy_response import SessionCopyResponse
76
+ from ...types.session_goto_response import SessionGotoResponse
77
+ from ...types.session_paste_response import SessionPasteResponse
78
+ from ...types.session_create_response import SessionCreateResponse
79
+ from ...types.session_scroll_response import SessionScrollResponse
80
+ from ...types.shared.success_response import SuccessResponse
81
+ from ...types.session_drag_and_drop_response import SessionDragAndDropResponse
82
+ from ...types.session_retrieve_downloads_response import SessionRetrieveDownloadsResponse
83
+
84
+ __all__ = ["SessionsResource", "AsyncSessionsResource"]
85
+
86
+
87
+ class SessionsResource(SyncAPIResource):
88
+ @cached_property
89
+ def all(self) -> AllResource:
90
+ return AllResource(self._client)
91
+
92
+ @cached_property
93
+ def recordings(self) -> RecordingsResource:
94
+ return RecordingsResource(self._client)
95
+
96
+ @cached_property
97
+ def mouse(self) -> MouseResource:
98
+ return MouseResource(self._client)
99
+
100
+ @cached_property
101
+ def keyboard(self) -> KeyboardResource:
102
+ return KeyboardResource(self._client)
103
+
104
+ @cached_property
105
+ def clipboard(self) -> ClipboardResource:
106
+ return ClipboardResource(self._client)
107
+
108
+ @cached_property
109
+ def with_raw_response(self) -> SessionsResourceWithRawResponse:
110
+ """
111
+ This property can be used as a prefix for any HTTP method call to return
112
+ the raw response object instead of the parsed content.
113
+
114
+ For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#accessing-raw-response-data-eg-headers
115
+ """
116
+ return SessionsResourceWithRawResponse(self)
117
+
118
+ @cached_property
119
+ def with_streaming_response(self) -> SessionsResourceWithStreamingResponse:
120
+ """
121
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
122
+
123
+ For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#with_streaming_response
124
+ """
125
+ return SessionsResourceWithStreamingResponse(self)
126
+
127
+ def create(
128
+ self,
129
+ *,
130
+ browser: session_create_params.Browser | NotGiven = NOT_GIVEN,
131
+ session: session_create_params.Session | NotGiven = NOT_GIVEN,
132
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
133
+ # The extra values given here take precedence over values defined on the client or passed to this method.
134
+ extra_headers: Headers | None = None,
135
+ extra_query: Query | None = None,
136
+ extra_body: Body | None = None,
137
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
138
+ ) -> SessionCreateResponse:
139
+ """
140
+ Allocates a new browser session for the user, with optional configurations for
141
+ ad-blocking, captcha solving, proxy usage, and idle timeout.
142
+
143
+ Args:
144
+ browser: Browser-specific configurations.
145
+
146
+ session: Session-related configurations.
147
+
148
+ extra_headers: Send extra headers
149
+
150
+ extra_query: Add additional query parameters to the request
151
+
152
+ extra_body: Add additional JSON properties to the request
153
+
154
+ timeout: Override the client-level default timeout for this request, in seconds
155
+ """
156
+ return self._post(
157
+ "/v1/sessions",
158
+ body=maybe_transform(
159
+ {
160
+ "browser": browser,
161
+ "session": session,
162
+ },
163
+ session_create_params.SessionCreateParams,
164
+ ),
165
+ options=make_request_options(
166
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
167
+ ),
168
+ cast_to=SessionCreateResponse,
169
+ )
170
+
171
+ def delete(
172
+ self,
173
+ session_id: str,
174
+ *,
175
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
176
+ # The extra values given here take precedence over values defined on the client or passed to this method.
177
+ extra_headers: Headers | None = None,
178
+ extra_query: Query | None = None,
179
+ extra_body: Body | None = None,
180
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
181
+ ) -> SuccessResponse:
182
+ """
183
+ Deletes the browser session associated with the provided browser session ID.
184
+ Requires a valid API key for authentication.
185
+
186
+ Args:
187
+ extra_headers: Send extra headers
188
+
189
+ extra_query: Add additional query parameters to the request
190
+
191
+ extra_body: Add additional JSON properties to the request
192
+
193
+ timeout: Override the client-level default timeout for this request, in seconds
194
+ """
195
+ if not session_id:
196
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
197
+ return self._delete(
198
+ f"/v1/sessions/{session_id}",
199
+ options=make_request_options(
200
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
201
+ ),
202
+ cast_to=SuccessResponse,
203
+ )
204
+
205
+ def copy(
206
+ self,
207
+ session_id: str,
208
+ *,
209
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
210
+ # The extra values given here take precedence over values defined on the client or passed to this method.
211
+ extra_headers: Headers | None = None,
212
+ extra_query: Query | None = None,
213
+ extra_body: Body | None = None,
214
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
215
+ ) -> SessionCopyResponse:
216
+ """
217
+ Copies the currently selected text to the clipboard
218
+
219
+ Args:
220
+ extra_headers: Send extra headers
221
+
222
+ extra_query: Add additional query parameters to the request
223
+
224
+ extra_body: Add additional JSON properties to the request
225
+
226
+ timeout: Override the client-level default timeout for this request, in seconds
227
+ """
228
+ if not session_id:
229
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
230
+ return self._post(
231
+ f"/v1/sessions/{session_id}/copy",
232
+ options=make_request_options(
233
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
234
+ ),
235
+ cast_to=SessionCopyResponse,
236
+ )
237
+
238
+ def drag_and_drop(
239
+ self,
240
+ session_id: str,
241
+ *,
242
+ end_x: int,
243
+ end_y: int,
244
+ start_x: int,
245
+ start_y: int,
246
+ button: Literal["left", "middle", "right"] | NotGiven = NOT_GIVEN,
247
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
248
+ # The extra values given here take precedence over values defined on the client or passed to this method.
249
+ extra_headers: Headers | None = None,
250
+ extra_query: Query | None = None,
251
+ extra_body: Body | None = None,
252
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
253
+ ) -> SessionDragAndDropResponse:
254
+ """
255
+ Performs a drag and drop operation from start coordinates to end coordinates
256
+
257
+ Args:
258
+ end_x: Ending X coordinate
259
+
260
+ end_y: Ending Y coordinate
261
+
262
+ start_x: Starting X coordinate
263
+
264
+ start_y: Starting Y coordinate
265
+
266
+ button: Mouse button to use
267
+
268
+ extra_headers: Send extra headers
269
+
270
+ extra_query: Add additional query parameters to the request
271
+
272
+ extra_body: Add additional JSON properties to the request
273
+
274
+ timeout: Override the client-level default timeout for this request, in seconds
275
+ """
276
+ if not session_id:
277
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
278
+ return self._post(
279
+ f"/v1/sessions/{session_id}/drag-and-drop",
280
+ body=maybe_transform(
281
+ {
282
+ "end_x": end_x,
283
+ "end_y": end_y,
284
+ "start_x": start_x,
285
+ "start_y": start_y,
286
+ "button": button,
287
+ },
288
+ session_drag_and_drop_params.SessionDragAndDropParams,
289
+ ),
290
+ options=make_request_options(
291
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
292
+ ),
293
+ cast_to=SessionDragAndDropResponse,
294
+ )
295
+
296
+ def goto(
297
+ self,
298
+ session_id: str,
299
+ *,
300
+ url: str,
301
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
302
+ # The extra values given here take precedence over values defined on the client or passed to this method.
303
+ extra_headers: Headers | None = None,
304
+ extra_query: Query | None = None,
305
+ extra_body: Body | None = None,
306
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
307
+ ) -> SessionGotoResponse:
308
+ """
309
+ Navigates the browser session to the specified URL
310
+
311
+ Args:
312
+ url: The URL to navigate to
313
+
314
+ extra_headers: Send extra headers
315
+
316
+ extra_query: Add additional query parameters to the request
317
+
318
+ extra_body: Add additional JSON properties to the request
319
+
320
+ timeout: Override the client-level default timeout for this request, in seconds
321
+ """
322
+ if not session_id:
323
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
324
+ return self._post(
325
+ f"/v1/sessions/{session_id}/goto",
326
+ body=maybe_transform({"url": url}, session_goto_params.SessionGotoParams),
327
+ options=make_request_options(
328
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
329
+ ),
330
+ cast_to=SessionGotoResponse,
331
+ )
332
+
333
+ def paste(
334
+ self,
335
+ session_id: str,
336
+ *,
337
+ text: str,
338
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
339
+ # The extra values given here take precedence over values defined on the client or passed to this method.
340
+ extra_headers: Headers | None = None,
341
+ extra_query: Query | None = None,
342
+ extra_body: Body | None = None,
343
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
344
+ ) -> SessionPasteResponse:
345
+ """
346
+ Pastes text at the current cursor position
347
+
348
+ Args:
349
+ text: Text to paste
350
+
351
+ extra_headers: Send extra headers
352
+
353
+ extra_query: Add additional query parameters to the request
354
+
355
+ extra_body: Add additional JSON properties to the request
356
+
357
+ timeout: Override the client-level default timeout for this request, in seconds
358
+ """
359
+ if not session_id:
360
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
361
+ return self._post(
362
+ f"/v1/sessions/{session_id}/paste",
363
+ body=maybe_transform({"text": text}, session_paste_params.SessionPasteParams),
364
+ options=make_request_options(
365
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
366
+ ),
367
+ cast_to=SessionPasteResponse,
368
+ )
369
+
370
+ def retrieve_downloads(
371
+ self,
372
+ session_id: str,
373
+ *,
374
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
375
+ # The extra values given here take precedence over values defined on the client or passed to this method.
376
+ extra_headers: Headers | None = None,
377
+ extra_query: Query | None = None,
378
+ extra_body: Body | None = None,
379
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
380
+ ) -> SessionRetrieveDownloadsResponse:
381
+ """Retrieves metadata of files downloaded during a browser session.
382
+
383
+ Requires a
384
+ valid API key for authentication.
385
+
386
+ Args:
387
+ extra_headers: Send extra headers
388
+
389
+ extra_query: Add additional query parameters to the request
390
+
391
+ extra_body: Add additional JSON properties to the request
392
+
393
+ timeout: Override the client-level default timeout for this request, in seconds
394
+ """
395
+ if not session_id:
396
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
397
+ return self._get(
398
+ f"/v1/sessions/{session_id}/downloads",
399
+ options=make_request_options(
400
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
401
+ ),
402
+ cast_to=SessionRetrieveDownloadsResponse,
403
+ )
404
+
405
+ def retrieve_screenshot(
406
+ self,
407
+ session_id: str,
408
+ *,
409
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
410
+ # The extra values given here take precedence over values defined on the client or passed to this method.
411
+ extra_headers: Headers | None = None,
412
+ extra_query: Query | None = None,
413
+ extra_body: Body | None = None,
414
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
415
+ ) -> BinaryAPIResponse:
416
+ """
417
+ Takes a screenshot of the current browser session and returns it as an image.
418
+
419
+ Args:
420
+ extra_headers: Send extra headers
421
+
422
+ extra_query: Add additional query parameters to the request
423
+
424
+ extra_body: Add additional JSON properties to the request
425
+
426
+ timeout: Override the client-level default timeout for this request, in seconds
427
+ """
428
+ if not session_id:
429
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
430
+ extra_headers = {"Accept": "image/png", **(extra_headers or {})}
431
+ return self._get(
432
+ f"/v1/sessions/{session_id}/screenshot",
433
+ options=make_request_options(
434
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
435
+ ),
436
+ cast_to=BinaryAPIResponse,
437
+ )
438
+
439
+ def scroll(
440
+ self,
441
+ session_id: str,
442
+ *,
443
+ delta_y: int,
444
+ x: int,
445
+ y: int,
446
+ delta_x: int | NotGiven = NOT_GIVEN,
447
+ steps: int | NotGiven = NOT_GIVEN,
448
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
449
+ # The extra values given here take precedence over values defined on the client or passed to this method.
450
+ extra_headers: Headers | None = None,
451
+ extra_query: Query | None = None,
452
+ extra_body: Body | None = None,
453
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
454
+ ) -> SessionScrollResponse:
455
+ """
456
+ Performs a scroll action at the specified coordinates
457
+
458
+ Args:
459
+ delta_y: Vertical scroll amount (positive is down, negative is up)
460
+
461
+ x: X coordinate
462
+
463
+ y: Y coordinate
464
+
465
+ delta_x: Horizontal scroll amount (positive is right, negative is left)
466
+
467
+ steps: Number of steps to break the scroll into for smoother scrolling
468
+
469
+ extra_headers: Send extra headers
470
+
471
+ extra_query: Add additional query parameters to the request
472
+
473
+ extra_body: Add additional JSON properties to the request
474
+
475
+ timeout: Override the client-level default timeout for this request, in seconds
476
+ """
477
+ if not session_id:
478
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
479
+ return self._post(
480
+ f"/v1/sessions/{session_id}/scroll",
481
+ body=maybe_transform(
482
+ {
483
+ "delta_y": delta_y,
484
+ "x": x,
485
+ "y": y,
486
+ "delta_x": delta_x,
487
+ "steps": steps,
488
+ },
489
+ session_scroll_params.SessionScrollParams,
490
+ ),
491
+ options=make_request_options(
492
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
493
+ ),
494
+ cast_to=SessionScrollResponse,
495
+ )
496
+
497
+
498
+ class AsyncSessionsResource(AsyncAPIResource):
499
+ @cached_property
500
+ def all(self) -> AsyncAllResource:
501
+ return AsyncAllResource(self._client)
502
+
503
+ @cached_property
504
+ def recordings(self) -> AsyncRecordingsResource:
505
+ return AsyncRecordingsResource(self._client)
506
+
507
+ @cached_property
508
+ def mouse(self) -> AsyncMouseResource:
509
+ return AsyncMouseResource(self._client)
510
+
511
+ @cached_property
512
+ def keyboard(self) -> AsyncKeyboardResource:
513
+ return AsyncKeyboardResource(self._client)
514
+
515
+ @cached_property
516
+ def clipboard(self) -> AsyncClipboardResource:
517
+ return AsyncClipboardResource(self._client)
518
+
519
+ @cached_property
520
+ def with_raw_response(self) -> AsyncSessionsResourceWithRawResponse:
521
+ """
522
+ This property can be used as a prefix for any HTTP method call to return
523
+ the raw response object instead of the parsed content.
524
+
525
+ For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#accessing-raw-response-data-eg-headers
526
+ """
527
+ return AsyncSessionsResourceWithRawResponse(self)
528
+
529
+ @cached_property
530
+ def with_streaming_response(self) -> AsyncSessionsResourceWithStreamingResponse:
531
+ """
532
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
533
+
534
+ For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#with_streaming_response
535
+ """
536
+ return AsyncSessionsResourceWithStreamingResponse(self)
537
+
538
+ async def create(
539
+ self,
540
+ *,
541
+ browser: session_create_params.Browser | NotGiven = NOT_GIVEN,
542
+ session: session_create_params.Session | NotGiven = NOT_GIVEN,
543
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
544
+ # The extra values given here take precedence over values defined on the client or passed to this method.
545
+ extra_headers: Headers | None = None,
546
+ extra_query: Query | None = None,
547
+ extra_body: Body | None = None,
548
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
549
+ ) -> SessionCreateResponse:
550
+ """
551
+ Allocates a new browser session for the user, with optional configurations for
552
+ ad-blocking, captcha solving, proxy usage, and idle timeout.
553
+
554
+ Args:
555
+ browser: Browser-specific configurations.
556
+
557
+ session: Session-related configurations.
558
+
559
+ extra_headers: Send extra headers
560
+
561
+ extra_query: Add additional query parameters to the request
562
+
563
+ extra_body: Add additional JSON properties to the request
564
+
565
+ timeout: Override the client-level default timeout for this request, in seconds
566
+ """
567
+ return await self._post(
568
+ "/v1/sessions",
569
+ body=await async_maybe_transform(
570
+ {
571
+ "browser": browser,
572
+ "session": session,
573
+ },
574
+ session_create_params.SessionCreateParams,
575
+ ),
576
+ options=make_request_options(
577
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
578
+ ),
579
+ cast_to=SessionCreateResponse,
580
+ )
581
+
582
+ async def delete(
583
+ self,
584
+ session_id: str,
585
+ *,
586
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
587
+ # The extra values given here take precedence over values defined on the client or passed to this method.
588
+ extra_headers: Headers | None = None,
589
+ extra_query: Query | None = None,
590
+ extra_body: Body | None = None,
591
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
592
+ ) -> SuccessResponse:
593
+ """
594
+ Deletes the browser session associated with the provided browser session ID.
595
+ Requires a valid API key for authentication.
596
+
597
+ Args:
598
+ extra_headers: Send extra headers
599
+
600
+ extra_query: Add additional query parameters to the request
601
+
602
+ extra_body: Add additional JSON properties to the request
603
+
604
+ timeout: Override the client-level default timeout for this request, in seconds
605
+ """
606
+ if not session_id:
607
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
608
+ return await self._delete(
609
+ f"/v1/sessions/{session_id}",
610
+ options=make_request_options(
611
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
612
+ ),
613
+ cast_to=SuccessResponse,
614
+ )
615
+
616
+ async def copy(
617
+ self,
618
+ session_id: str,
619
+ *,
620
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
621
+ # The extra values given here take precedence over values defined on the client or passed to this method.
622
+ extra_headers: Headers | None = None,
623
+ extra_query: Query | None = None,
624
+ extra_body: Body | None = None,
625
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
626
+ ) -> SessionCopyResponse:
627
+ """
628
+ Copies the currently selected text to the clipboard
629
+
630
+ Args:
631
+ extra_headers: Send extra headers
632
+
633
+ extra_query: Add additional query parameters to the request
634
+
635
+ extra_body: Add additional JSON properties to the request
636
+
637
+ timeout: Override the client-level default timeout for this request, in seconds
638
+ """
639
+ if not session_id:
640
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
641
+ return await self._post(
642
+ f"/v1/sessions/{session_id}/copy",
643
+ options=make_request_options(
644
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
645
+ ),
646
+ cast_to=SessionCopyResponse,
647
+ )
648
+
649
+ async def drag_and_drop(
650
+ self,
651
+ session_id: str,
652
+ *,
653
+ end_x: int,
654
+ end_y: int,
655
+ start_x: int,
656
+ start_y: int,
657
+ button: Literal["left", "middle", "right"] | NotGiven = NOT_GIVEN,
658
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
659
+ # The extra values given here take precedence over values defined on the client or passed to this method.
660
+ extra_headers: Headers | None = None,
661
+ extra_query: Query | None = None,
662
+ extra_body: Body | None = None,
663
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
664
+ ) -> SessionDragAndDropResponse:
665
+ """
666
+ Performs a drag and drop operation from start coordinates to end coordinates
667
+
668
+ Args:
669
+ end_x: Ending X coordinate
670
+
671
+ end_y: Ending Y coordinate
672
+
673
+ start_x: Starting X coordinate
674
+
675
+ start_y: Starting Y coordinate
676
+
677
+ button: Mouse button to use
678
+
679
+ extra_headers: Send extra headers
680
+
681
+ extra_query: Add additional query parameters to the request
682
+
683
+ extra_body: Add additional JSON properties to the request
684
+
685
+ timeout: Override the client-level default timeout for this request, in seconds
686
+ """
687
+ if not session_id:
688
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
689
+ return await self._post(
690
+ f"/v1/sessions/{session_id}/drag-and-drop",
691
+ body=await async_maybe_transform(
692
+ {
693
+ "end_x": end_x,
694
+ "end_y": end_y,
695
+ "start_x": start_x,
696
+ "start_y": start_y,
697
+ "button": button,
698
+ },
699
+ session_drag_and_drop_params.SessionDragAndDropParams,
700
+ ),
701
+ options=make_request_options(
702
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
703
+ ),
704
+ cast_to=SessionDragAndDropResponse,
705
+ )
706
+
707
+ async def goto(
708
+ self,
709
+ session_id: str,
710
+ *,
711
+ url: str,
712
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
713
+ # The extra values given here take precedence over values defined on the client or passed to this method.
714
+ extra_headers: Headers | None = None,
715
+ extra_query: Query | None = None,
716
+ extra_body: Body | None = None,
717
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
718
+ ) -> SessionGotoResponse:
719
+ """
720
+ Navigates the browser session to the specified URL
721
+
722
+ Args:
723
+ url: The URL to navigate to
724
+
725
+ extra_headers: Send extra headers
726
+
727
+ extra_query: Add additional query parameters to the request
728
+
729
+ extra_body: Add additional JSON properties to the request
730
+
731
+ timeout: Override the client-level default timeout for this request, in seconds
732
+ """
733
+ if not session_id:
734
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
735
+ return await self._post(
736
+ f"/v1/sessions/{session_id}/goto",
737
+ body=await async_maybe_transform({"url": url}, session_goto_params.SessionGotoParams),
738
+ options=make_request_options(
739
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
740
+ ),
741
+ cast_to=SessionGotoResponse,
742
+ )
743
+
744
+ async def paste(
745
+ self,
746
+ session_id: str,
747
+ *,
748
+ text: str,
749
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
750
+ # The extra values given here take precedence over values defined on the client or passed to this method.
751
+ extra_headers: Headers | None = None,
752
+ extra_query: Query | None = None,
753
+ extra_body: Body | None = None,
754
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
755
+ ) -> SessionPasteResponse:
756
+ """
757
+ Pastes text at the current cursor position
758
+
759
+ Args:
760
+ text: Text to paste
761
+
762
+ extra_headers: Send extra headers
763
+
764
+ extra_query: Add additional query parameters to the request
765
+
766
+ extra_body: Add additional JSON properties to the request
767
+
768
+ timeout: Override the client-level default timeout for this request, in seconds
769
+ """
770
+ if not session_id:
771
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
772
+ return await self._post(
773
+ f"/v1/sessions/{session_id}/paste",
774
+ body=await async_maybe_transform({"text": text}, session_paste_params.SessionPasteParams),
775
+ options=make_request_options(
776
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
777
+ ),
778
+ cast_to=SessionPasteResponse,
779
+ )
780
+
781
+ async def retrieve_downloads(
782
+ self,
783
+ session_id: str,
784
+ *,
785
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
786
+ # The extra values given here take precedence over values defined on the client or passed to this method.
787
+ extra_headers: Headers | None = None,
788
+ extra_query: Query | None = None,
789
+ extra_body: Body | None = None,
790
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
791
+ ) -> SessionRetrieveDownloadsResponse:
792
+ """Retrieves metadata of files downloaded during a browser session.
793
+
794
+ Requires a
795
+ valid API key for authentication.
796
+
797
+ Args:
798
+ extra_headers: Send extra headers
799
+
800
+ extra_query: Add additional query parameters to the request
801
+
802
+ extra_body: Add additional JSON properties to the request
803
+
804
+ timeout: Override the client-level default timeout for this request, in seconds
805
+ """
806
+ if not session_id:
807
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
808
+ return await self._get(
809
+ f"/v1/sessions/{session_id}/downloads",
810
+ options=make_request_options(
811
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
812
+ ),
813
+ cast_to=SessionRetrieveDownloadsResponse,
814
+ )
815
+
816
+ async def retrieve_screenshot(
817
+ self,
818
+ session_id: str,
819
+ *,
820
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
821
+ # The extra values given here take precedence over values defined on the client or passed to this method.
822
+ extra_headers: Headers | None = None,
823
+ extra_query: Query | None = None,
824
+ extra_body: Body | None = None,
825
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
826
+ ) -> AsyncBinaryAPIResponse:
827
+ """
828
+ Takes a screenshot of the current browser session and returns it as an image.
829
+
830
+ Args:
831
+ extra_headers: Send extra headers
832
+
833
+ extra_query: Add additional query parameters to the request
834
+
835
+ extra_body: Add additional JSON properties to the request
836
+
837
+ timeout: Override the client-level default timeout for this request, in seconds
838
+ """
839
+ if not session_id:
840
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
841
+ extra_headers = {"Accept": "image/png", **(extra_headers or {})}
842
+ return await self._get(
843
+ f"/v1/sessions/{session_id}/screenshot",
844
+ options=make_request_options(
845
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
846
+ ),
847
+ cast_to=AsyncBinaryAPIResponse,
848
+ )
849
+
850
+ async def scroll(
851
+ self,
852
+ session_id: str,
853
+ *,
854
+ delta_y: int,
855
+ x: int,
856
+ y: int,
857
+ delta_x: int | NotGiven = NOT_GIVEN,
858
+ steps: int | NotGiven = NOT_GIVEN,
859
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
860
+ # The extra values given here take precedence over values defined on the client or passed to this method.
861
+ extra_headers: Headers | None = None,
862
+ extra_query: Query | None = None,
863
+ extra_body: Body | None = None,
864
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
865
+ ) -> SessionScrollResponse:
866
+ """
867
+ Performs a scroll action at the specified coordinates
868
+
869
+ Args:
870
+ delta_y: Vertical scroll amount (positive is down, negative is up)
871
+
872
+ x: X coordinate
873
+
874
+ y: Y coordinate
875
+
876
+ delta_x: Horizontal scroll amount (positive is right, negative is left)
877
+
878
+ steps: Number of steps to break the scroll into for smoother scrolling
879
+
880
+ extra_headers: Send extra headers
881
+
882
+ extra_query: Add additional query parameters to the request
883
+
884
+ extra_body: Add additional JSON properties to the request
885
+
886
+ timeout: Override the client-level default timeout for this request, in seconds
887
+ """
888
+ if not session_id:
889
+ raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
890
+ return await self._post(
891
+ f"/v1/sessions/{session_id}/scroll",
892
+ body=await async_maybe_transform(
893
+ {
894
+ "delta_y": delta_y,
895
+ "x": x,
896
+ "y": y,
897
+ "delta_x": delta_x,
898
+ "steps": steps,
899
+ },
900
+ session_scroll_params.SessionScrollParams,
901
+ ),
902
+ options=make_request_options(
903
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
904
+ ),
905
+ cast_to=SessionScrollResponse,
906
+ )
907
+
908
+
909
+ class SessionsResourceWithRawResponse:
910
+ def __init__(self, sessions: SessionsResource) -> None:
911
+ self._sessions = sessions
912
+
913
+ self.create = to_raw_response_wrapper(
914
+ sessions.create,
915
+ )
916
+ self.delete = to_raw_response_wrapper(
917
+ sessions.delete,
918
+ )
919
+ self.copy = to_raw_response_wrapper(
920
+ sessions.copy,
921
+ )
922
+ self.drag_and_drop = to_raw_response_wrapper(
923
+ sessions.drag_and_drop,
924
+ )
925
+ self.goto = to_raw_response_wrapper(
926
+ sessions.goto,
927
+ )
928
+ self.paste = to_raw_response_wrapper(
929
+ sessions.paste,
930
+ )
931
+ self.retrieve_downloads = to_raw_response_wrapper(
932
+ sessions.retrieve_downloads,
933
+ )
934
+ self.retrieve_screenshot = to_custom_raw_response_wrapper(
935
+ sessions.retrieve_screenshot,
936
+ BinaryAPIResponse,
937
+ )
938
+ self.scroll = to_raw_response_wrapper(
939
+ sessions.scroll,
940
+ )
941
+
942
+ @cached_property
943
+ def all(self) -> AllResourceWithRawResponse:
944
+ return AllResourceWithRawResponse(self._sessions.all)
945
+
946
+ @cached_property
947
+ def recordings(self) -> RecordingsResourceWithRawResponse:
948
+ return RecordingsResourceWithRawResponse(self._sessions.recordings)
949
+
950
+ @cached_property
951
+ def mouse(self) -> MouseResourceWithRawResponse:
952
+ return MouseResourceWithRawResponse(self._sessions.mouse)
953
+
954
+ @cached_property
955
+ def keyboard(self) -> KeyboardResourceWithRawResponse:
956
+ return KeyboardResourceWithRawResponse(self._sessions.keyboard)
957
+
958
+ @cached_property
959
+ def clipboard(self) -> ClipboardResourceWithRawResponse:
960
+ return ClipboardResourceWithRawResponse(self._sessions.clipboard)
961
+
962
+
963
+ class AsyncSessionsResourceWithRawResponse:
964
+ def __init__(self, sessions: AsyncSessionsResource) -> None:
965
+ self._sessions = sessions
966
+
967
+ self.create = async_to_raw_response_wrapper(
968
+ sessions.create,
969
+ )
970
+ self.delete = async_to_raw_response_wrapper(
971
+ sessions.delete,
972
+ )
973
+ self.copy = async_to_raw_response_wrapper(
974
+ sessions.copy,
975
+ )
976
+ self.drag_and_drop = async_to_raw_response_wrapper(
977
+ sessions.drag_and_drop,
978
+ )
979
+ self.goto = async_to_raw_response_wrapper(
980
+ sessions.goto,
981
+ )
982
+ self.paste = async_to_raw_response_wrapper(
983
+ sessions.paste,
984
+ )
985
+ self.retrieve_downloads = async_to_raw_response_wrapper(
986
+ sessions.retrieve_downloads,
987
+ )
988
+ self.retrieve_screenshot = async_to_custom_raw_response_wrapper(
989
+ sessions.retrieve_screenshot,
990
+ AsyncBinaryAPIResponse,
991
+ )
992
+ self.scroll = async_to_raw_response_wrapper(
993
+ sessions.scroll,
994
+ )
995
+
996
+ @cached_property
997
+ def all(self) -> AsyncAllResourceWithRawResponse:
998
+ return AsyncAllResourceWithRawResponse(self._sessions.all)
999
+
1000
+ @cached_property
1001
+ def recordings(self) -> AsyncRecordingsResourceWithRawResponse:
1002
+ return AsyncRecordingsResourceWithRawResponse(self._sessions.recordings)
1003
+
1004
+ @cached_property
1005
+ def mouse(self) -> AsyncMouseResourceWithRawResponse:
1006
+ return AsyncMouseResourceWithRawResponse(self._sessions.mouse)
1007
+
1008
+ @cached_property
1009
+ def keyboard(self) -> AsyncKeyboardResourceWithRawResponse:
1010
+ return AsyncKeyboardResourceWithRawResponse(self._sessions.keyboard)
1011
+
1012
+ @cached_property
1013
+ def clipboard(self) -> AsyncClipboardResourceWithRawResponse:
1014
+ return AsyncClipboardResourceWithRawResponse(self._sessions.clipboard)
1015
+
1016
+
1017
+ class SessionsResourceWithStreamingResponse:
1018
+ def __init__(self, sessions: SessionsResource) -> None:
1019
+ self._sessions = sessions
1020
+
1021
+ self.create = to_streamed_response_wrapper(
1022
+ sessions.create,
1023
+ )
1024
+ self.delete = to_streamed_response_wrapper(
1025
+ sessions.delete,
1026
+ )
1027
+ self.copy = to_streamed_response_wrapper(
1028
+ sessions.copy,
1029
+ )
1030
+ self.drag_and_drop = to_streamed_response_wrapper(
1031
+ sessions.drag_and_drop,
1032
+ )
1033
+ self.goto = to_streamed_response_wrapper(
1034
+ sessions.goto,
1035
+ )
1036
+ self.paste = to_streamed_response_wrapper(
1037
+ sessions.paste,
1038
+ )
1039
+ self.retrieve_downloads = to_streamed_response_wrapper(
1040
+ sessions.retrieve_downloads,
1041
+ )
1042
+ self.retrieve_screenshot = to_custom_streamed_response_wrapper(
1043
+ sessions.retrieve_screenshot,
1044
+ StreamedBinaryAPIResponse,
1045
+ )
1046
+ self.scroll = to_streamed_response_wrapper(
1047
+ sessions.scroll,
1048
+ )
1049
+
1050
+ @cached_property
1051
+ def all(self) -> AllResourceWithStreamingResponse:
1052
+ return AllResourceWithStreamingResponse(self._sessions.all)
1053
+
1054
+ @cached_property
1055
+ def recordings(self) -> RecordingsResourceWithStreamingResponse:
1056
+ return RecordingsResourceWithStreamingResponse(self._sessions.recordings)
1057
+
1058
+ @cached_property
1059
+ def mouse(self) -> MouseResourceWithStreamingResponse:
1060
+ return MouseResourceWithStreamingResponse(self._sessions.mouse)
1061
+
1062
+ @cached_property
1063
+ def keyboard(self) -> KeyboardResourceWithStreamingResponse:
1064
+ return KeyboardResourceWithStreamingResponse(self._sessions.keyboard)
1065
+
1066
+ @cached_property
1067
+ def clipboard(self) -> ClipboardResourceWithStreamingResponse:
1068
+ return ClipboardResourceWithStreamingResponse(self._sessions.clipboard)
1069
+
1070
+
1071
+ class AsyncSessionsResourceWithStreamingResponse:
1072
+ def __init__(self, sessions: AsyncSessionsResource) -> None:
1073
+ self._sessions = sessions
1074
+
1075
+ self.create = async_to_streamed_response_wrapper(
1076
+ sessions.create,
1077
+ )
1078
+ self.delete = async_to_streamed_response_wrapper(
1079
+ sessions.delete,
1080
+ )
1081
+ self.copy = async_to_streamed_response_wrapper(
1082
+ sessions.copy,
1083
+ )
1084
+ self.drag_and_drop = async_to_streamed_response_wrapper(
1085
+ sessions.drag_and_drop,
1086
+ )
1087
+ self.goto = async_to_streamed_response_wrapper(
1088
+ sessions.goto,
1089
+ )
1090
+ self.paste = async_to_streamed_response_wrapper(
1091
+ sessions.paste,
1092
+ )
1093
+ self.retrieve_downloads = async_to_streamed_response_wrapper(
1094
+ sessions.retrieve_downloads,
1095
+ )
1096
+ self.retrieve_screenshot = async_to_custom_streamed_response_wrapper(
1097
+ sessions.retrieve_screenshot,
1098
+ AsyncStreamedBinaryAPIResponse,
1099
+ )
1100
+ self.scroll = async_to_streamed_response_wrapper(
1101
+ sessions.scroll,
1102
+ )
1103
+
1104
+ @cached_property
1105
+ def all(self) -> AsyncAllResourceWithStreamingResponse:
1106
+ return AsyncAllResourceWithStreamingResponse(self._sessions.all)
1107
+
1108
+ @cached_property
1109
+ def recordings(self) -> AsyncRecordingsResourceWithStreamingResponse:
1110
+ return AsyncRecordingsResourceWithStreamingResponse(self._sessions.recordings)
1111
+
1112
+ @cached_property
1113
+ def mouse(self) -> AsyncMouseResourceWithStreamingResponse:
1114
+ return AsyncMouseResourceWithStreamingResponse(self._sessions.mouse)
1115
+
1116
+ @cached_property
1117
+ def keyboard(self) -> AsyncKeyboardResourceWithStreamingResponse:
1118
+ return AsyncKeyboardResourceWithStreamingResponse(self._sessions.keyboard)
1119
+
1120
+ @cached_property
1121
+ def clipboard(self) -> AsyncClipboardResourceWithStreamingResponse:
1122
+ return AsyncClipboardResourceWithStreamingResponse(self._sessions.clipboard)