anchorbrowser 0.3.5__py3-none-any.whl → 0.3.7__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.
- anchorbrowser/_constants.py +3 -3
- anchorbrowser/_models.py +8 -3
- anchorbrowser/_utils/_sync.py +3 -31
- anchorbrowser/_version.py +1 -1
- anchorbrowser/resources/task/run.py +233 -0
- anchorbrowser/resources/task.py +8 -0
- anchorbrowser/resources/tools.py +4 -2
- anchorbrowser/types/task/run_execute_params.py +3 -0
- anchorbrowser/types/tool_perform_web_task_params.py +1 -1
- {anchorbrowser-0.3.5.dist-info → anchorbrowser-0.3.7.dist-info}/METADATA +3 -3
- {anchorbrowser-0.3.5.dist-info → anchorbrowser-0.3.7.dist-info}/RECORD +13 -12
- {anchorbrowser-0.3.5.dist-info → anchorbrowser-0.3.7.dist-info}/WHEEL +0 -0
- {anchorbrowser-0.3.5.dist-info → anchorbrowser-0.3.7.dist-info}/licenses/LICENSE +0 -0
anchorbrowser/_constants.py
CHANGED
|
@@ -6,9 +6,9 @@ RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"
|
|
|
6
6
|
OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
|
|
7
7
|
|
|
8
8
|
# default timeout is 1 minute
|
|
9
|
-
DEFAULT_TIMEOUT = httpx.Timeout(timeout=
|
|
10
|
-
DEFAULT_MAX_RETRIES =
|
|
11
|
-
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=
|
|
9
|
+
DEFAULT_TIMEOUT = httpx.Timeout(timeout=1200, connect=20.0)
|
|
10
|
+
DEFAULT_MAX_RETRIES = 0
|
|
11
|
+
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100000, max_keepalive_connections=20)
|
|
12
12
|
|
|
13
13
|
INITIAL_RETRY_DELAY = 0.5
|
|
14
14
|
MAX_RETRY_DELAY = 8.0
|
anchorbrowser/_models.py
CHANGED
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
import inspect
|
|
5
|
+
import weakref
|
|
5
6
|
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
|
|
6
7
|
from datetime import date, datetime
|
|
7
8
|
from typing_extensions import (
|
|
@@ -576,6 +577,9 @@ class CachedDiscriminatorType(Protocol):
|
|
|
576
577
|
__discriminator__: DiscriminatorDetails
|
|
577
578
|
|
|
578
579
|
|
|
580
|
+
DISCRIMINATOR_CACHE: weakref.WeakKeyDictionary[type, DiscriminatorDetails] = weakref.WeakKeyDictionary()
|
|
581
|
+
|
|
582
|
+
|
|
579
583
|
class DiscriminatorDetails:
|
|
580
584
|
field_name: str
|
|
581
585
|
"""The name of the discriminator field in the variant class, e.g.
|
|
@@ -618,8 +622,9 @@ class DiscriminatorDetails:
|
|
|
618
622
|
|
|
619
623
|
|
|
620
624
|
def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, ...]) -> DiscriminatorDetails | None:
|
|
621
|
-
|
|
622
|
-
|
|
625
|
+
cached = DISCRIMINATOR_CACHE.get(union)
|
|
626
|
+
if cached is not None:
|
|
627
|
+
return cached
|
|
623
628
|
|
|
624
629
|
discriminator_field_name: str | None = None
|
|
625
630
|
|
|
@@ -672,7 +677,7 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any,
|
|
|
672
677
|
discriminator_field=discriminator_field_name,
|
|
673
678
|
discriminator_alias=discriminator_alias,
|
|
674
679
|
)
|
|
675
|
-
|
|
680
|
+
DISCRIMINATOR_CACHE.setdefault(union, details)
|
|
676
681
|
return details
|
|
677
682
|
|
|
678
683
|
|
anchorbrowser/_utils/_sync.py
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import sys
|
|
4
3
|
import asyncio
|
|
5
4
|
import functools
|
|
6
|
-
import
|
|
7
|
-
from typing import Any, TypeVar, Callable, Awaitable
|
|
5
|
+
from typing import TypeVar, Callable, Awaitable
|
|
8
6
|
from typing_extensions import ParamSpec
|
|
9
7
|
|
|
10
8
|
import anyio
|
|
@@ -15,34 +13,11 @@ T_Retval = TypeVar("T_Retval")
|
|
|
15
13
|
T_ParamSpec = ParamSpec("T_ParamSpec")
|
|
16
14
|
|
|
17
15
|
|
|
18
|
-
if sys.version_info >= (3, 9):
|
|
19
|
-
_asyncio_to_thread = asyncio.to_thread
|
|
20
|
-
else:
|
|
21
|
-
# backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread
|
|
22
|
-
# for Python 3.8 support
|
|
23
|
-
async def _asyncio_to_thread(
|
|
24
|
-
func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
|
|
25
|
-
) -> Any:
|
|
26
|
-
"""Asynchronously run function *func* in a separate thread.
|
|
27
|
-
|
|
28
|
-
Any *args and **kwargs supplied for this function are directly passed
|
|
29
|
-
to *func*. Also, the current :class:`contextvars.Context` is propagated,
|
|
30
|
-
allowing context variables from the main thread to be accessed in the
|
|
31
|
-
separate thread.
|
|
32
|
-
|
|
33
|
-
Returns a coroutine that can be awaited to get the eventual result of *func*.
|
|
34
|
-
"""
|
|
35
|
-
loop = asyncio.events.get_running_loop()
|
|
36
|
-
ctx = contextvars.copy_context()
|
|
37
|
-
func_call = functools.partial(ctx.run, func, *args, **kwargs)
|
|
38
|
-
return await loop.run_in_executor(None, func_call)
|
|
39
|
-
|
|
40
|
-
|
|
41
16
|
async def to_thread(
|
|
42
17
|
func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
|
|
43
18
|
) -> T_Retval:
|
|
44
19
|
if sniffio.current_async_library() == "asyncio":
|
|
45
|
-
return await
|
|
20
|
+
return await asyncio.to_thread(func, *args, **kwargs)
|
|
46
21
|
|
|
47
22
|
return await anyio.to_thread.run_sync(
|
|
48
23
|
functools.partial(func, *args, **kwargs),
|
|
@@ -53,10 +28,7 @@ async def to_thread(
|
|
|
53
28
|
def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]:
|
|
54
29
|
"""
|
|
55
30
|
Take a blocking function and create an async one that receives the same
|
|
56
|
-
positional and keyword arguments.
|
|
57
|
-
asyncio.to_thread to run the function in a separate thread. For python version
|
|
58
|
-
3.8, it uses locally defined copy of the asyncio.to_thread function which was
|
|
59
|
-
introduced in python 3.9.
|
|
31
|
+
positional and keyword arguments.
|
|
60
32
|
|
|
61
33
|
Usage:
|
|
62
34
|
|
anchorbrowser/_version.py
CHANGED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
10
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
11
|
+
from ..._compat import cached_property
|
|
12
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
13
|
+
from ..._response import (
|
|
14
|
+
to_raw_response_wrapper,
|
|
15
|
+
to_streamed_response_wrapper,
|
|
16
|
+
async_to_raw_response_wrapper,
|
|
17
|
+
async_to_streamed_response_wrapper,
|
|
18
|
+
)
|
|
19
|
+
from ...types.task import run_execute_params
|
|
20
|
+
from ..._base_client import make_request_options
|
|
21
|
+
from ...types.task.run_execute_response import RunExecuteResponse
|
|
22
|
+
|
|
23
|
+
__all__ = ["RunResource", "AsyncRunResource"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class RunResource(SyncAPIResource):
|
|
27
|
+
@cached_property
|
|
28
|
+
def with_raw_response(self) -> RunResourceWithRawResponse:
|
|
29
|
+
"""
|
|
30
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
31
|
+
the raw response object instead of the parsed content.
|
|
32
|
+
|
|
33
|
+
For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#accessing-raw-response-data-eg-headers
|
|
34
|
+
"""
|
|
35
|
+
return RunResourceWithRawResponse(self)
|
|
36
|
+
|
|
37
|
+
@cached_property
|
|
38
|
+
def with_streaming_response(self) -> RunResourceWithStreamingResponse:
|
|
39
|
+
"""
|
|
40
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
41
|
+
|
|
42
|
+
For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#with_streaming_response
|
|
43
|
+
"""
|
|
44
|
+
return RunResourceWithStreamingResponse(self)
|
|
45
|
+
|
|
46
|
+
def execute(
|
|
47
|
+
self,
|
|
48
|
+
*,
|
|
49
|
+
task_id: str,
|
|
50
|
+
async_: bool | Omit = omit,
|
|
51
|
+
inputs: Dict[str, str] | Omit = omit,
|
|
52
|
+
override_browser_configuration: run_execute_params.OverrideBrowserConfiguration | Omit = omit,
|
|
53
|
+
session_id: str | Omit = omit,
|
|
54
|
+
task_session_id: str | Omit = omit,
|
|
55
|
+
version: str | Omit = omit,
|
|
56
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
57
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
58
|
+
extra_headers: Headers | None = None,
|
|
59
|
+
extra_query: Query | None = None,
|
|
60
|
+
extra_body: Body | None = None,
|
|
61
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
62
|
+
) -> RunExecuteResponse:
|
|
63
|
+
"""Executes a task in a browser session.
|
|
64
|
+
|
|
65
|
+
The task can be run with a specific
|
|
66
|
+
version or the latest version. Optionally, you can provide an existing session
|
|
67
|
+
ID or let the system create a new one.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
task_id: Task identifier
|
|
71
|
+
|
|
72
|
+
async_: Whether to run the task asynchronously.
|
|
73
|
+
|
|
74
|
+
inputs: Environment variables for task execution (keys must start with ANCHOR\\__)
|
|
75
|
+
|
|
76
|
+
override_browser_configuration: Override browser configuration for this execution
|
|
77
|
+
|
|
78
|
+
session_id: Optional existing session ID to use
|
|
79
|
+
|
|
80
|
+
task_session_id: Optional task-specific session ID
|
|
81
|
+
|
|
82
|
+
version: Version to run (draft, latest, or version number)
|
|
83
|
+
|
|
84
|
+
extra_headers: Send extra headers
|
|
85
|
+
|
|
86
|
+
extra_query: Add additional query parameters to the request
|
|
87
|
+
|
|
88
|
+
extra_body: Add additional JSON properties to the request
|
|
89
|
+
|
|
90
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
91
|
+
"""
|
|
92
|
+
return self._post(
|
|
93
|
+
"/v1/task/run",
|
|
94
|
+
body=maybe_transform(
|
|
95
|
+
{
|
|
96
|
+
"task_id": task_id,
|
|
97
|
+
"async_": async_,
|
|
98
|
+
"inputs": inputs,
|
|
99
|
+
"override_browser_configuration": override_browser_configuration,
|
|
100
|
+
"session_id": session_id,
|
|
101
|
+
"task_session_id": task_session_id,
|
|
102
|
+
"version": version,
|
|
103
|
+
},
|
|
104
|
+
run_execute_params.RunExecuteParams,
|
|
105
|
+
),
|
|
106
|
+
options=make_request_options(
|
|
107
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
108
|
+
),
|
|
109
|
+
cast_to=RunExecuteResponse,
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
class AsyncRunResource(AsyncAPIResource):
|
|
114
|
+
@cached_property
|
|
115
|
+
def with_raw_response(self) -> AsyncRunResourceWithRawResponse:
|
|
116
|
+
"""
|
|
117
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
118
|
+
the raw response object instead of the parsed content.
|
|
119
|
+
|
|
120
|
+
For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#accessing-raw-response-data-eg-headers
|
|
121
|
+
"""
|
|
122
|
+
return AsyncRunResourceWithRawResponse(self)
|
|
123
|
+
|
|
124
|
+
@cached_property
|
|
125
|
+
def with_streaming_response(self) -> AsyncRunResourceWithStreamingResponse:
|
|
126
|
+
"""
|
|
127
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
128
|
+
|
|
129
|
+
For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#with_streaming_response
|
|
130
|
+
"""
|
|
131
|
+
return AsyncRunResourceWithStreamingResponse(self)
|
|
132
|
+
|
|
133
|
+
async def execute(
|
|
134
|
+
self,
|
|
135
|
+
*,
|
|
136
|
+
task_id: str,
|
|
137
|
+
async_: bool | Omit = omit,
|
|
138
|
+
inputs: Dict[str, str] | Omit = omit,
|
|
139
|
+
override_browser_configuration: run_execute_params.OverrideBrowserConfiguration | Omit = omit,
|
|
140
|
+
session_id: str | Omit = omit,
|
|
141
|
+
task_session_id: str | Omit = omit,
|
|
142
|
+
version: str | Omit = omit,
|
|
143
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
144
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
145
|
+
extra_headers: Headers | None = None,
|
|
146
|
+
extra_query: Query | None = None,
|
|
147
|
+
extra_body: Body | None = None,
|
|
148
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
149
|
+
) -> RunExecuteResponse:
|
|
150
|
+
"""Executes a task in a browser session.
|
|
151
|
+
|
|
152
|
+
The task can be run with a specific
|
|
153
|
+
version or the latest version. Optionally, you can provide an existing session
|
|
154
|
+
ID or let the system create a new one.
|
|
155
|
+
|
|
156
|
+
Args:
|
|
157
|
+
task_id: Task identifier
|
|
158
|
+
|
|
159
|
+
async_: Whether to run the task asynchronously.
|
|
160
|
+
|
|
161
|
+
inputs: Environment variables for task execution (keys must start with ANCHOR\\__)
|
|
162
|
+
|
|
163
|
+
override_browser_configuration: Override browser configuration for this execution
|
|
164
|
+
|
|
165
|
+
session_id: Optional existing session ID to use
|
|
166
|
+
|
|
167
|
+
task_session_id: Optional task-specific session ID
|
|
168
|
+
|
|
169
|
+
version: Version to run (draft, latest, or version number)
|
|
170
|
+
|
|
171
|
+
extra_headers: Send extra headers
|
|
172
|
+
|
|
173
|
+
extra_query: Add additional query parameters to the request
|
|
174
|
+
|
|
175
|
+
extra_body: Add additional JSON properties to the request
|
|
176
|
+
|
|
177
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
178
|
+
"""
|
|
179
|
+
return await self._post(
|
|
180
|
+
"/v1/task/run",
|
|
181
|
+
body=await async_maybe_transform(
|
|
182
|
+
{
|
|
183
|
+
"task_id": task_id,
|
|
184
|
+
"async_": async_,
|
|
185
|
+
"inputs": inputs,
|
|
186
|
+
"override_browser_configuration": override_browser_configuration,
|
|
187
|
+
"session_id": session_id,
|
|
188
|
+
"task_session_id": task_session_id,
|
|
189
|
+
"version": version,
|
|
190
|
+
},
|
|
191
|
+
run_execute_params.RunExecuteParams,
|
|
192
|
+
),
|
|
193
|
+
options=make_request_options(
|
|
194
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
195
|
+
),
|
|
196
|
+
cast_to=RunExecuteResponse,
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
class RunResourceWithRawResponse:
|
|
201
|
+
def __init__(self, run: RunResource) -> None:
|
|
202
|
+
self._run = run
|
|
203
|
+
|
|
204
|
+
self.execute = to_raw_response_wrapper(
|
|
205
|
+
run.execute,
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
class AsyncRunResourceWithRawResponse:
|
|
210
|
+
def __init__(self, run: AsyncRunResource) -> None:
|
|
211
|
+
self._run = run
|
|
212
|
+
|
|
213
|
+
self.execute = async_to_raw_response_wrapper(
|
|
214
|
+
run.execute,
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
class RunResourceWithStreamingResponse:
|
|
219
|
+
def __init__(self, run: RunResource) -> None:
|
|
220
|
+
self._run = run
|
|
221
|
+
|
|
222
|
+
self.execute = to_streamed_response_wrapper(
|
|
223
|
+
run.execute,
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
class AsyncRunResourceWithStreamingResponse:
|
|
228
|
+
def __init__(self, run: AsyncRunResource) -> None:
|
|
229
|
+
self._run = run
|
|
230
|
+
|
|
231
|
+
self.execute = async_to_streamed_response_wrapper(
|
|
232
|
+
run.execute,
|
|
233
|
+
)
|
anchorbrowser/resources/task.py
CHANGED
|
@@ -157,6 +157,7 @@ class TaskResource(SyncAPIResource):
|
|
|
157
157
|
self,
|
|
158
158
|
*,
|
|
159
159
|
task_id: str,
|
|
160
|
+
async_: bool | Omit = omit,
|
|
160
161
|
inputs: Dict[str, str] | Omit = omit,
|
|
161
162
|
override_browser_configuration: run_execute_params.OverrideBrowserConfiguration | Omit = omit,
|
|
162
163
|
session_id: str | Omit = omit,
|
|
@@ -178,6 +179,8 @@ class TaskResource(SyncAPIResource):
|
|
|
178
179
|
Args:
|
|
179
180
|
task_id: Task identifier
|
|
180
181
|
|
|
182
|
+
async_: Whether to run the task asynchronously.
|
|
183
|
+
|
|
181
184
|
inputs: Environment variables for task execution (keys must start with ANCHOR\\__)
|
|
182
185
|
|
|
183
186
|
override_browser_configuration: Override browser configuration for this execution
|
|
@@ -201,6 +204,7 @@ class TaskResource(SyncAPIResource):
|
|
|
201
204
|
body=maybe_transform(
|
|
202
205
|
{
|
|
203
206
|
"task_id": task_id,
|
|
207
|
+
"async_": async_,
|
|
204
208
|
"inputs": inputs,
|
|
205
209
|
"override_browser_configuration": override_browser_configuration,
|
|
206
210
|
"session_id": session_id,
|
|
@@ -346,6 +350,7 @@ class AsyncTaskResource(AsyncAPIResource):
|
|
|
346
350
|
self,
|
|
347
351
|
*,
|
|
348
352
|
task_id: str,
|
|
353
|
+
async_: bool | Omit = omit,
|
|
349
354
|
inputs: Dict[str, str] | Omit = omit,
|
|
350
355
|
override_browser_configuration: run_execute_params.OverrideBrowserConfiguration | Omit = omit,
|
|
351
356
|
session_id: str | Omit = omit,
|
|
@@ -367,6 +372,8 @@ class AsyncTaskResource(AsyncAPIResource):
|
|
|
367
372
|
Args:
|
|
368
373
|
task_id: Task identifier
|
|
369
374
|
|
|
375
|
+
async_: Whether to run the task asynchronously.
|
|
376
|
+
|
|
370
377
|
inputs: Environment variables for task execution (keys must start with ANCHOR\\__)
|
|
371
378
|
|
|
372
379
|
override_browser_configuration: Override browser configuration for this execution
|
|
@@ -390,6 +397,7 @@ class AsyncTaskResource(AsyncAPIResource):
|
|
|
390
397
|
body=await async_maybe_transform(
|
|
391
398
|
{
|
|
392
399
|
"task_id": task_id,
|
|
400
|
+
"async": async_,
|
|
393
401
|
"inputs": inputs,
|
|
394
402
|
"override_browser_configuration": override_browser_configuration,
|
|
395
403
|
"session_id": session_id,
|
anchorbrowser/resources/tools.py
CHANGED
|
@@ -165,7 +165,8 @@ class ToolsResource(SyncAPIResource):
|
|
|
165
165
|
human_intervention: Allow human intervention during task execution. When enabled, the agent can
|
|
166
166
|
request human input for ambiguous situations.
|
|
167
167
|
|
|
168
|
-
max_steps: Maximum number of steps the agent can take to complete the task. Defaults
|
|
168
|
+
max_steps: Maximum number of steps the agent can take to complete the task. Defaults
|
|
169
|
+
to 200.
|
|
169
170
|
|
|
170
171
|
model: The specific model to use for task completion. see our
|
|
171
172
|
[models](/agentic-browser-control/ai-task-completion#available-models) page for
|
|
@@ -437,7 +438,8 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
437
438
|
human_intervention: Allow human intervention during task execution. When enabled, the agent can
|
|
438
439
|
request human input for ambiguous situations.
|
|
439
440
|
|
|
440
|
-
max_steps: Maximum number of steps the agent can take to complete the task. Defaults
|
|
441
|
+
max_steps: Maximum number of steps the agent can take to complete the task. Defaults
|
|
442
|
+
to 200.
|
|
441
443
|
|
|
442
444
|
model: The specific model to use for task completion. see our
|
|
443
445
|
[models](/agentic-browser-control/ai-task-completion#available-models) page for
|
|
@@ -23,6 +23,9 @@ class RunExecuteParams(TypedDict, total=False):
|
|
|
23
23
|
task_id: Required[Annotated[str, PropertyInfo(alias="taskId")]]
|
|
24
24
|
"""Task identifier"""
|
|
25
25
|
|
|
26
|
+
async_: Annotated[bool, PropertyInfo(alias="async")]
|
|
27
|
+
"""Whether to run the task asynchronously."""
|
|
28
|
+
|
|
26
29
|
inputs: Dict[str, str]
|
|
27
30
|
"""Environment variables for task execution (keys must start with ANCHOR\\__)"""
|
|
28
31
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: anchorbrowser
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.7
|
|
4
4
|
Summary: The official Python library for the anchorbrowser API
|
|
5
5
|
Project-URL: Homepage, https://github.com/anchorbrowser/AnchorBrowser-SDK-Python
|
|
6
6
|
Project-URL: Repository, https://github.com/anchorbrowser/AnchorBrowser-SDK-Python
|
|
@@ -39,7 +39,7 @@ Description-Content-Type: text/markdown
|
|
|
39
39
|
<!-- prettier-ignore -->
|
|
40
40
|
[)](https://pypi.org/project/anchorbrowser/)
|
|
41
41
|
|
|
42
|
-
The Anchorbrowser Python library provides convenient access to the Anchorbrowser REST API from any Python 3.
|
|
42
|
+
The Anchorbrowser Python library provides convenient access to the Anchorbrowser REST API from any Python 3.9+
|
|
43
43
|
application. The library includes type definitions for all request params and response fields,
|
|
44
44
|
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
|
|
45
45
|
|
|
@@ -445,7 +445,7 @@ print(anchorbrowser.__version__)
|
|
|
445
445
|
|
|
446
446
|
## Requirements
|
|
447
447
|
|
|
448
|
-
Python 3.
|
|
448
|
+
Python 3.9 or higher.
|
|
449
449
|
|
|
450
450
|
## Contributing
|
|
451
451
|
|
|
@@ -2,16 +2,16 @@ anchorbrowser/__init__.py,sha256=Wl16NhVAsaRBCpDtHZjZXDY31QMKfCIRNjzJcfb8D9E,272
|
|
|
2
2
|
anchorbrowser/_base_client.py,sha256=fl8ELiO1VjtUQLGCkJiTouZAxtX3b-teiU8Z0ANoR7g,67054
|
|
3
3
|
anchorbrowser/_client.py,sha256=BXHIqml4Sz3u49HQvUxpvvTARWFwMhQBr3F9P5zVzv4,19586
|
|
4
4
|
anchorbrowser/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
|
|
5
|
-
anchorbrowser/_constants.py,sha256=
|
|
5
|
+
anchorbrowser/_constants.py,sha256=rKs4WwdZfRAvd1f_BWJm7vbaHYIdDm7Z7tz5NQKGbPM,468
|
|
6
6
|
anchorbrowser/_exceptions.py,sha256=Qz7WOsYUFZ3bEoN28V-C9Wk-EvYerqP83-fMUINlZKQ,3234
|
|
7
7
|
anchorbrowser/_files.py,sha256=l2iwVskD9JQ4iZJU9ZcsucF4VBARg5nEFWpiFfPcT-M,3630
|
|
8
|
-
anchorbrowser/_models.py,sha256=
|
|
8
|
+
anchorbrowser/_models.py,sha256=sSSI-vS14HPulq2691kGH3RRCLVG57l498uQI2SzdAU,30700
|
|
9
9
|
anchorbrowser/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
|
|
10
10
|
anchorbrowser/_resource.py,sha256=7lE1EgpVj5kwckk-27umtigTOf9nKTyRl97cgNwRbRQ,1142
|
|
11
11
|
anchorbrowser/_response.py,sha256=xsiyWOC8LWW-NvbFtZ-MJD4f7eI9RnivKwtKImZ-8o4,28860
|
|
12
12
|
anchorbrowser/_streaming.py,sha256=ageQnvSloL91I4OxR1GL6-V5sDa4A_99PX1Sgi-U7zY,10177
|
|
13
13
|
anchorbrowser/_types.py,sha256=hYSr4gk9908ZiGTqMX3pHhdzfzUUaHVelFS_I6p2Uj0,7243
|
|
14
|
-
anchorbrowser/_version.py,sha256=
|
|
14
|
+
anchorbrowser/_version.py,sha256=P11tnm8_OoKbEnl5j7xM8P0ut6fWnA07Jj3t1_q51NM,165
|
|
15
15
|
anchorbrowser/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
anchorbrowser/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
|
|
17
17
|
anchorbrowser/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
|
|
@@ -21,7 +21,7 @@ anchorbrowser/_utils/_proxy.py,sha256=aglnj2yBTDyGX9Akk2crZHrl10oqRmceUy2Zp008XE
|
|
|
21
21
|
anchorbrowser/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
|
|
22
22
|
anchorbrowser/_utils/_resources_proxy.py,sha256=j7_xjI2NDhDOFbnwTIAJPVV2D-MhYwEvfoA7qCWB6wo,624
|
|
23
23
|
anchorbrowser/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
|
|
24
|
-
anchorbrowser/_utils/_sync.py,sha256=
|
|
24
|
+
anchorbrowser/_utils/_sync.py,sha256=HBnZkkBnzxtwOZe0212C4EyoRvxhTVtTrLFDz2_xVCg,1589
|
|
25
25
|
anchorbrowser/_utils/_transform.py,sha256=NjCzmnfqYrsAikUHQig6N9QfuTVbKipuP3ur9mcNF-E,15951
|
|
26
26
|
anchorbrowser/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,4786
|
|
27
27
|
anchorbrowser/_utils/_utils.py,sha256=ugfUaneOK7I8h9b3656flwf5u_kthY0gvNuqvgOLoSU,12252
|
|
@@ -35,8 +35,8 @@ anchorbrowser/resources/browser.py,sha256=BB5hq_ayIDL_ziYHq13oj8US3XkHzkoXiGLBm7
|
|
|
35
35
|
anchorbrowser/resources/events.py,sha256=B6TwziBmOVMjWwoFO7OJR2X_Jt_3jtzNhQg4lgY-7SE,10780
|
|
36
36
|
anchorbrowser/resources/extensions.py,sha256=KWySN-tu8Cxy-LbY3TXLNMPs1s5Hzwwk7Rmr1AYLVeU,15943
|
|
37
37
|
anchorbrowser/resources/profiles.py,sha256=g6xLjfmdXfRM5QV-N-omShpSPO_jMvRRmxKjOllq5RQ,16206
|
|
38
|
-
anchorbrowser/resources/task.py,sha256=
|
|
39
|
-
anchorbrowser/resources/tools.py,sha256=
|
|
38
|
+
anchorbrowser/resources/task.py,sha256=ciHGW2SJTbpvIlxFOkAtngpG1T82X9Tth456l0uhRH8,17239
|
|
39
|
+
anchorbrowser/resources/tools.py,sha256=lqVo9w1gvDD7Q_bRV9H_KoLa3RDHac7-yDzw7KV6mlg,25988
|
|
40
40
|
anchorbrowser/resources/sessions/__init__.py,sha256=51tmuaKqEsEMfFTtZOovPAid6vYyKLkv6quuFBnQSiY,3330
|
|
41
41
|
anchorbrowser/resources/sessions/all.py,sha256=5iN5Vv6UW-2p07lEqiRHw3fFQC4m_acfvsn3yZVi_g0,7193
|
|
42
42
|
anchorbrowser/resources/sessions/clipboard.py,sha256=RuoY6Ev5oKsuk0KhPgtRk5GXCjqCk2D16e2hXzRY-4I,9572
|
|
@@ -49,6 +49,7 @@ anchorbrowser/resources/sessions/agent/files.py,sha256=E5pFDXEeaqJAN7DfE774WWJMf
|
|
|
49
49
|
anchorbrowser/resources/sessions/recordings/__init__.py,sha256=MRWTb2Kwpc-wGBrcaa5YnTntQ9Z85Zd0McKS5K_mG00,1067
|
|
50
50
|
anchorbrowser/resources/sessions/recordings/primary.py,sha256=p739aM0tU6CUx2KAgbo2O0oS-5T438Ho7SeUH9eSKXI,6569
|
|
51
51
|
anchorbrowser/resources/sessions/recordings/recordings.py,sha256=LtaT51hX5GWdl21ypu2SGKzEHJHfsjWhJkqAy_fjWGo,13746
|
|
52
|
+
anchorbrowser/resources/task/run.py,sha256=cLl3SOWzzfkOuo7lVdcqKpfG_QXtzKTQnYF2acVUj7s,8559
|
|
52
53
|
anchorbrowser/types/__init__.py,sha256=mnuoFsN6OClbSkY0jpie8UQuq_ukz-XMlY6l_flVcHM,3620
|
|
53
54
|
anchorbrowser/types/batch_session_create_params.py,sha256=ZmrNF7tOLvd7P4zFSNlz70HEC8wNJ51_VLGnC7h07nM,11530
|
|
54
55
|
anchorbrowser/types/batch_session_create_response.py,sha256=K3EqFJzenfNDjzoTaWefPjuyULlxTMhdemBjKAd3_Dg,761
|
|
@@ -87,7 +88,7 @@ anchorbrowser/types/task_list_params.py,sha256=pu0gLGBp5UxKLpbEpSEz-J-kSRrY6VIvz
|
|
|
87
88
|
anchorbrowser/types/task_list_response.py,sha256=cxLCLS7yX3CpnpbAGhTb9rshW4DFUtjLxKWPLe8_99A,8126
|
|
88
89
|
anchorbrowser/types/tool_fetch_webpage_params.py,sha256=g_C7tLpyFx4I2r7-iizM7ZiQ71-VfowCj9aufaSHjmg,1181
|
|
89
90
|
anchorbrowser/types/tool_fetch_webpage_response.py,sha256=hdbrNgPz_LeWa3_aVbtck-n-SRvO4moFDbGoSf_2_tU,210
|
|
90
|
-
anchorbrowser/types/tool_perform_web_task_params.py,sha256=
|
|
91
|
+
anchorbrowser/types/tool_perform_web_task_params.py,sha256=6EGsoxMasrZCxwfPOx_vY6kPwLl8wdA7nqw2pKiEbkY,2120
|
|
91
92
|
anchorbrowser/types/tool_perform_web_task_response.py,sha256=c7GCKQxXNql6UxXDXcRcetxUg0lOHd5lB4DdbKoKwh4,400
|
|
92
93
|
anchorbrowser/types/tool_screenshot_webpage_params.py,sha256=a7p4nCi6mQRJvTZD3wYDa67UGsB4v4CqOhW6x8-9Rrk,1344
|
|
93
94
|
anchorbrowser/types/sessions/__init__.py,sha256=kiMjL-pt4Umx2DAnt8UP8lo4eM9X_UBDXO7JdYBzpcs,1493
|
|
@@ -116,9 +117,9 @@ anchorbrowser/types/sessions/recordings/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_
|
|
|
116
117
|
anchorbrowser/types/shared/__init__.py,sha256=FQKjY3VDxI8T0feNRazdY5TOqb2KDeEwZaoJjsxuEl4,152
|
|
117
118
|
anchorbrowser/types/shared/success_response.py,sha256=l9OWrucXoSjBdsx5QKdvBPFtxv8d0YdpYY6iL5cWWuc,314
|
|
118
119
|
anchorbrowser/types/task/__init__.py,sha256=CbGxF7UFks1LsFq_wdSi62f4bgThKymv5OOSDmaFBI4,267
|
|
119
|
-
anchorbrowser/types/task/run_execute_params.py,sha256=
|
|
120
|
+
anchorbrowser/types/task/run_execute_params.py,sha256=WMEic2hETsUAhTHVZbJfzMqC0tbEGKId-9NHz5ivWNo,6788
|
|
120
121
|
anchorbrowser/types/task/run_execute_response.py,sha256=ha86lTlKsLA_yZlaHNHEqBM1F--GiOLuifZpAk9J1bM,794
|
|
121
|
-
anchorbrowser-0.3.
|
|
122
|
-
anchorbrowser-0.3.
|
|
123
|
-
anchorbrowser-0.3.
|
|
124
|
-
anchorbrowser-0.3.
|
|
122
|
+
anchorbrowser-0.3.7.dist-info/METADATA,sha256=43JxMBn0cIlE1lFenbtZ94pQ6caSreGHDHrTcd_b9lI,15279
|
|
123
|
+
anchorbrowser-0.3.7.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
124
|
+
anchorbrowser-0.3.7.dist-info/licenses/LICENSE,sha256=QYTH6OztHxnELDn890vME8F7-euzmsHhWI4XOSYxwOg,11343
|
|
125
|
+
anchorbrowser-0.3.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|