You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `browser_use.APIConnectionError` is raised.
126
+
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `browser_use_sdk.APIConnectionError` is raised.
127
127
128
128
When the API returns a non-success status code (that is, 4xx or 5xx
129
-
response), a subclass of `browser_use.APIStatusError` is raised, containing `status_code` and `response` properties.
129
+
response), a subclass of `browser_use_sdk.APIStatusError` is raised, containing `status_code` and `response` properties.
130
130
131
-
All errors inherit from `browser_use.APIError`.
131
+
All errors inherit from `browser_use_sdk.APIError`.
132
132
133
133
```python
134
-
importbrowser_use
135
-
frombrowser_useimport BrowserUse
134
+
importbrowser_use_sdk
135
+
frombrowser_use_sdkimport BrowserUse
136
136
137
137
client = BrowserUse()
138
138
139
139
try:
140
140
client.tasks.list()
141
-
exceptbrowser_use.APIConnectionError as e:
141
+
exceptbrowser_use_sdk.APIConnectionError as e:
142
142
print("The server could not be reached")
143
143
print(e.__cause__) # an underlying Exception, likely raised within httpx.
144
-
exceptbrowser_use.RateLimitError as e:
144
+
exceptbrowser_use_sdk.RateLimitError as e:
145
145
print("A 429 status code was received; we should back off a bit.")
146
-
exceptbrowser_use.APIStatusError as e:
146
+
exceptbrowser_use_sdk.APIStatusError as e:
147
147
print("Another non-200-range status code was received")
148
148
print(e.status_code)
149
149
print(e.response)
@@ -171,7 +171,7 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
171
171
You can use the `max_retries` option to configure or disable retry settings:
172
172
173
173
```python
174
-
frombrowser_useimport BrowserUse
174
+
frombrowser_use_sdkimport BrowserUse
175
175
176
176
# Configure the default for all requests:
177
177
client = BrowserUse(
@@ -189,7 +189,7 @@ By default requests time out after 1 minute. You can configure this with a `time
189
189
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
190
190
191
191
```python
192
-
frombrowser_useimport BrowserUse
192
+
frombrowser_use_sdkimport BrowserUse
193
193
194
194
# Configure the default for all requests:
195
195
client = BrowserUse(
@@ -241,7 +241,7 @@ if response.my_field is None:
241
241
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
242
242
243
243
```py
244
-
frombrowser_useimport BrowserUse
244
+
frombrowser_use_sdkimport BrowserUse
245
245
246
246
client = BrowserUse()
247
247
response = client.tasks.with_raw_response.list()
@@ -251,9 +251,9 @@ task = response.parse() # get the object that `tasks.list()` would have returne
251
251
print(task.items)
252
252
```
253
253
254
-
These methods return an [`APIResponse`](https://github.com/browser-use/browser-use-python/tree/main/src/browser_use/_response.py) object.
254
+
These methods return an [`APIResponse`](https://github.com/browser-use/browser-use-python/tree/main/src/browser_use_sdk/_response.py) object.
255
255
256
-
The async client returns an [`AsyncAPIResponse`](https://github.com/browser-use/browser-use-python/tree/main/src/browser_use/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
256
+
The async client returns an [`AsyncAPIResponse`](https://github.com/browser-use/browser-use-python/tree/main/src/browser_use_sdk/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
257
257
258
258
#### `.with_streaming_response`
259
259
@@ -315,7 +315,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.
339
339
340
340
```py
341
-
frombrowser_useimport BrowserUse
341
+
frombrowser_use_sdkimport BrowserUse
342
342
343
343
with BrowserUse() as client:
344
344
# make requests here
@@ -366,8 +366,8 @@ If you've upgraded to the latest version but aren't seeing any new features you
366
366
You can determine the version that is being used at runtime with:
0 commit comments