Skip to content

Commit 76f7597

Browse files
authored
Merge pull request #2 from browser-use/release-please--branches--main--changes--next
release: 0.1.0
2 parents 45dd330 + e7f6794 commit 76f7597

File tree

115 files changed

+3253
-918
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+3253
-918
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.0.2"
2+
".": "0.1.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 22
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browser-use%2Fbrowser-use-86040fd18419e7b4e0947660d9c0ff1abe21550528d2d2a549736cd16f85a92d.yml
3-
openapi_spec_hash: 7c5de9d0f633db35fd9e250fcc834d1f
4-
config_hash: 771e55285d36ab0c796ac0f29840fa8f
1+
configured_endpoints: 26
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browser-use%2Fbrowser-use-3a9488448292a0736b08b2d6427e702eaf7106d86345ca2e65b64bed4398b036.yml
3+
openapi_spec_hash: 5ff2781dcc11a0c9aa353f5cb14bcc16
4+
config_hash: 9d52be5177b2ede4cb0633c04f4cc4ef

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## 0.1.0 (2025-08-18)
4+
5+
Full Changelog: [v0.0.2...v0.1.0](https://github.com/browser-use/browser-use-python/compare/v0.0.2...v0.1.0)
6+
7+
### Features
8+
9+
* Add start_url ([2ede0a9](https://github.com/browser-use/browser-use-python/commit/2ede0a9089bfbba1eca207508a52ee36b4ef18ac))
10+
* Align Task Filtering by Status with `status` Field ([29b4590](https://github.com/browser-use/browser-use-python/commit/29b4590c69f13fbf7f855888862ef77a9e704172))
11+
* **api:** api update ([5867532](https://github.com/browser-use/browser-use-python/commit/58675327b6a0e7ba41f312e4887062a9b6dc2852))
12+
* **api:** manual updates ([78727c0](https://github.com/browser-use/browser-use-python/commit/78727c02cefa53fd0dd877e137b7b6f92e14fce8))
13+
* **api:** update via SDK Studio ([b283386](https://github.com/browser-use/browser-use-python/commit/b283386b805435a87114e807f8919185cb6a5b7b))
14+
* Fix Stainless GitHub Action ([5dcf360](https://github.com/browser-use/browser-use-python/commit/5dcf360ccfe40f45962ecaa64b8a5aacf55778d4))
15+
* Update param and response views ([44b4c5d](https://github.com/browser-use/browser-use-python/commit/44b4c5d7ed416f9f5c37afb3287cdaa6f22a30cd))
16+
17+
18+
### Chores
19+
20+
* **internal:** codegen related update ([151d56b](https://github.com/browser-use/browser-use-python/commit/151d56ba67c2d09970ff415472c0a1d259716bbc))
21+
322
## 0.0.2 (2025-08-09)
423

524
Full Changelog: [v0.0.1...v0.0.2](https://github.com/browser-use/browser-use-python/compare/v0.0.1...v0.0.2)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $ pip install -r requirements-dev.lock
3636

3737
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
3838
result in merge conflicts between manual patches and changes from the generator. The generator will never
39-
modify the contents of the `src/browser_use/lib/` and `examples/` directories.
39+
modify the contents of the `src/browser_use_sdk/lib/` and `examples/` directories.
4040

4141
## Adding and running examples
4242

README.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ The full API of this library can be found in [api.md](api.md).
2626

2727
```python
2828
import os
29-
from browser_use import BrowserUse
29+
from browser_use_sdk import BrowserUse
3030

3131
client = BrowserUse(
3232
api_key=os.environ.get("BROWSER_USE_API_KEY"), # This is the default and can be omitted
3333
)
3434

35-
tasks = client.tasks.list()
36-
print(tasks.items)
35+
me = client.users.me.retrieve()
36+
print(me.additional_credits_balance_usd)
3737
```
3838

3939
While you can provide an `api_key` keyword argument,
@@ -48,16 +48,16 @@ Simply import `AsyncBrowserUse` instead of `BrowserUse` and use `await` with eac
4848
```python
4949
import os
5050
import asyncio
51-
from browser_use import AsyncBrowserUse
51+
from browser_use_sdk import AsyncBrowserUse
5252

5353
client = AsyncBrowserUse(
5454
api_key=os.environ.get("BROWSER_USE_API_KEY"), # This is the default and can be omitted
5555
)
5656

5757

5858
async def main() -> None:
59-
tasks = await client.tasks.list()
60-
print(tasks.items)
59+
me = await client.users.me.retrieve()
60+
print(me.additional_credits_balance_usd)
6161

6262

6363
asyncio.run(main())
@@ -80,17 +80,17 @@ Then you can enable it by instantiating the client with `http_client=DefaultAioH
8080

8181
```python
8282
import asyncio
83-
from browser_use import DefaultAioHttpClient
84-
from browser_use import AsyncBrowserUse
83+
from browser_use_sdk import DefaultAioHttpClient
84+
from browser_use_sdk import AsyncBrowserUse
8585

8686

8787
async def main() -> None:
8888
async with AsyncBrowserUse(
8989
api_key="My API Key",
9090
http_client=DefaultAioHttpClient(),
9191
) as client:
92-
tasks = await client.tasks.list()
93-
print(tasks.items)
92+
me = await client.users.me.retrieve()
93+
print(me.additional_credits_balance_usd)
9494

9595

9696
asyncio.run(main())
@@ -110,40 +110,40 @@ Typed requests and responses provide autocomplete and documentation within your
110110
Nested parameters are dictionaries, typed using `TypedDict`, for example:
111111

112112
```python
113-
from browser_use import BrowserUse
113+
from browser_use_sdk import BrowserUse
114114

115115
client = BrowserUse()
116116

117-
task_view = client.tasks.create(
117+
task = client.tasks.create(
118118
task="x",
119119
agent_settings={},
120120
)
121-
print(task_view.agent_settings)
121+
print(task.agent_settings)
122122
```
123123

124124
## Handling errors
125125

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.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.
127127

128128
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.
130130

131-
All errors inherit from `browser_use.APIError`.
131+
All errors inherit from `browser_use_sdk.APIError`.
132132

133133
```python
134-
import browser_use
135-
from browser_use import BrowserUse
134+
import browser_use_sdk
135+
from browser_use_sdk import BrowserUse
136136

137137
client = BrowserUse()
138138

139139
try:
140-
client.tasks.list()
141-
except browser_use.APIConnectionError as e:
140+
client.users.me.retrieve()
141+
except browser_use_sdk.APIConnectionError as e:
142142
print("The server could not be reached")
143143
print(e.__cause__) # an underlying Exception, likely raised within httpx.
144-
except browser_use.RateLimitError as e:
144+
except browser_use_sdk.RateLimitError as e:
145145
print("A 429 status code was received; we should back off a bit.")
146-
except browser_use.APIStatusError as e:
146+
except browser_use_sdk.APIStatusError as e:
147147
print("Another non-200-range status code was received")
148148
print(e.status_code)
149149
print(e.response)
@@ -171,7 +171,7 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
171171
You can use the `max_retries` option to configure or disable retry settings:
172172

173173
```python
174-
from browser_use import BrowserUse
174+
from browser_use_sdk import BrowserUse
175175

176176
# Configure the default for all requests:
177177
client = BrowserUse(
@@ -180,7 +180,7 @@ client = BrowserUse(
180180
)
181181

182182
# Or, configure per-request:
183-
client.with_options(max_retries=5).tasks.list()
183+
client.with_options(max_retries=5).users.me.retrieve()
184184
```
185185

186186
### Timeouts
@@ -189,7 +189,7 @@ By default requests time out after 1 minute. You can configure this with a `time
189189
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
190190

191191
```python
192-
from browser_use import BrowserUse
192+
from browser_use_sdk import BrowserUse
193193

194194
# Configure the default for all requests:
195195
client = BrowserUse(
@@ -203,7 +203,7 @@ client = BrowserUse(
203203
)
204204

205205
# Override per-request:
206-
client.with_options(timeout=5.0).tasks.list()
206+
client.with_options(timeout=5.0).users.me.retrieve()
207207
```
208208

209209
On timeout, an `APITimeoutError` is thrown.
@@ -241,19 +241,19 @@ if response.my_field is None:
241241
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
242242

243243
```py
244-
from browser_use import BrowserUse
244+
from browser_use_sdk import BrowserUse
245245

246246
client = BrowserUse()
247-
response = client.tasks.with_raw_response.list()
247+
response = client.users.me.with_raw_response.retrieve()
248248
print(response.headers.get('X-My-Header'))
249249

250-
task = response.parse() # get the object that `tasks.list()` would have returned
251-
print(task.items)
250+
me = response.parse() # get the object that `users.me.retrieve()` would have returned
251+
print(me.additional_credits_balance_usd)
252252
```
253253

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.
255255

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.
257257

258258
#### `.with_streaming_response`
259259

@@ -262,7 +262,7 @@ The above interface eagerly reads the full response body when you make the reque
262262
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
263263

264264
```python
265-
with client.tasks.with_streaming_response.list() as response:
265+
with client.users.me.with_streaming_response.retrieve() as response:
266266
print(response.headers.get("X-My-Header"))
267267

268268
for line in response.iter_lines():
@@ -315,7 +315,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
315315

316316
```python
317317
import httpx
318-
from browser_use import BrowserUse, DefaultHttpxClient
318+
from browser_use_sdk import BrowserUse, DefaultHttpxClient
319319

320320
client = BrowserUse(
321321
# Or use the `BROWSER_USE_BASE_URL` env var
@@ -338,7 +338,7 @@ client.with_options(http_client=DefaultHttpxClient(...))
338338
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.
339339

340340
```py
341-
from browser_use import BrowserUse
341+
from browser_use_sdk import BrowserUse
342342

343343
with BrowserUse() as client:
344344
# make requests here
@@ -366,8 +366,8 @@ If you've upgraded to the latest version but aren't seeing any new features you
366366
You can determine the version that is being used at runtime with:
367367

368368
```py
369-
import browser_use
370-
print(browser_use.__version__)
369+
import browser_use_sdk
370+
print(browser_use_sdk.__version__)
371371
```
372372

373373
## Requirements

0 commit comments

Comments
 (0)