Skip to content

Commit f032352

Browse files
feat(api): manual updates
1 parent 2dcbe2d commit f032352

File tree

19 files changed

+302
-318
lines changed

19 files changed

+302
-318
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
run: |
2929
bash ./bin/publish-pypi
3030
env:
31-
PYPI_TOKEN: ${{ secrets.BROWSERBASE_PYPI_TOKEN || secrets.PYPI_TOKEN }}
31+
PYPI_TOKEN: ${{ secrets.STAGEHAND_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.github/workflows/release-doctor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
run: |
1919
bash ./bin/check-release-environment
2020
env:
21-
PYPI_TOKEN: ${{ secrets.BROWSERBASE_PYPI_TOKEN || secrets.PYPI_TOKEN }}
21+
PYPI_TOKEN: ${{ secrets.STAGEHAND_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 7
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-0c12f985340be2a9287e8e01ff8733f7f2d02e019149d1ae95f1a8f8798c6690.yml
33
openapi_spec_hash: efb79934e1dc63763dd4e8493b825273
4-
config_hash: 905fc70fd4344c8631aab6754bffd883
4+
config_hash: 1de7cb9bd4dc46fe3e20b637bc534908

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2025 Browserbase
189+
Copyright 2025 Stagehand
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Browserbase Python API library
1+
# Stagehand Python API library
22

33
<!-- prettier-ignore -->
44
[![PyPI version](https://img.shields.io/pypi/v/stagehand.svg?label=pypi%20(stable))](https://pypi.org/project/stagehand/)
55

6-
The Browserbase Python library provides convenient access to the Browserbase REST API from any Python 3.9+
6+
The Stagehand Python library provides convenient access to the Stagehand REST API from any Python 3.9+
77
application. The library includes type definitions for all request params and response fields,
88
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
99

1010
It is generated with [Stainless](https://www.stainless.com/).
1111

1212
## Documentation
1313

14-
The REST API documentation can be found on [browserbase.com](https://browserbase.com). The full API of this library can be found in [api.md](api.md).
14+
The REST API documentation can be found on [docs.stagehand.dev](https://docs.stagehand.dev). The full API of this library can be found in [api.md](api.md).
1515

1616
## Installation
1717

@@ -29,9 +29,9 @@ The full API of this library can be found in [api.md](api.md).
2929

3030
```python
3131
import os
32-
from stagehand import Browserbase
32+
from stagehand import Stagehand
3333

34-
client = Browserbase(
34+
client = Stagehand(
3535
api_key=os.environ.get("STAGEHAND_API_KEY"), # This is the default and can be omitted
3636
# or 'production' | 'local'; defaults to "production".
3737
environment="dev",
@@ -50,14 +50,14 @@ so that your API Key is not stored in source control.
5050

5151
## Async usage
5252

53-
Simply import `AsyncBrowserbase` instead of `Browserbase` and use `await` with each API call:
53+
Simply import `AsyncStagehand` instead of `Stagehand` and use `await` with each API call:
5454

5555
```python
5656
import os
5757
import asyncio
58-
from stagehand import AsyncBrowserbase
58+
from stagehand import AsyncStagehand
5959

60-
client = AsyncBrowserbase(
60+
client = AsyncStagehand(
6161
api_key=os.environ.get("STAGEHAND_API_KEY"), # This is the default and can be omitted
6262
# or 'production' | 'local'; defaults to "production".
6363
environment="dev",
@@ -93,11 +93,11 @@ Then you can enable it by instantiating the client with `http_client=DefaultAioH
9393
import os
9494
import asyncio
9595
from stagehand import DefaultAioHttpClient
96-
from stagehand import AsyncBrowserbase
96+
from stagehand import AsyncStagehand
9797

9898

9999
async def main() -> None:
100-
async with AsyncBrowserbase(
100+
async with AsyncStagehand(
101101
api_key=os.environ.get("STAGEHAND_API_KEY"), # This is the default and can be omitted
102102
http_client=DefaultAioHttpClient(),
103103
) as client:
@@ -124,9 +124,9 @@ Typed requests and responses provide autocomplete and documentation within your
124124
Nested parameters are dictionaries, typed using `TypedDict`, for example:
125125

126126
```python
127-
from stagehand import Browserbase
127+
from stagehand import Stagehand
128128

129-
client = Browserbase()
129+
client = Stagehand()
130130

131131
response = client.sessions.start(
132132
env="LOCAL",
@@ -146,9 +146,9 @@ All errors inherit from `stagehand.APIError`.
146146

147147
```python
148148
import stagehand
149-
from stagehand import Browserbase
149+
from stagehand import Stagehand
150150

151-
client = Browserbase()
151+
client = Stagehand()
152152

153153
try:
154154
client.sessions.start(
@@ -187,10 +187,10 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
187187
You can use the `max_retries` option to configure or disable retry settings:
188188

189189
```python
190-
from stagehand import Browserbase
190+
from stagehand import Stagehand
191191

192192
# Configure the default for all requests:
193-
client = Browserbase(
193+
client = Stagehand(
194194
# default is 2
195195
max_retries=0,
196196
)
@@ -207,16 +207,16 @@ By default requests time out after 1 minute. You can configure this with a `time
207207
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
208208

209209
```python
210-
from stagehand import Browserbase
210+
from stagehand import Stagehand
211211

212212
# Configure the default for all requests:
213-
client = Browserbase(
213+
client = Stagehand(
214214
# 20 seconds (default is 1 minute)
215215
timeout=20.0,
216216
)
217217

218218
# More granular control:
219-
client = Browserbase(
219+
client = Stagehand(
220220
timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
221221
)
222222

@@ -236,10 +236,10 @@ Note that requests that time out are [retried twice by default](#retries).
236236

237237
We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.
238238

239-
You can enable logging by setting the environment variable `BROWSERBASE_LOG` to `info`.
239+
You can enable logging by setting the environment variable `STAGEHAND_LOG` to `info`.
240240

241241
```shell
242-
$ export BROWSERBASE_LOG=info
242+
$ export STAGEHAND_LOG=info
243243
```
244244

245245
Or to `debug` for more verbose logging.
@@ -261,9 +261,9 @@ if response.my_field is None:
261261
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
262262

263263
```py
264-
from stagehand import Browserbase
264+
from stagehand import Stagehand
265265

266-
client = Browserbase()
266+
client = Stagehand()
267267
response = client.sessions.with_raw_response.start(
268268
env="LOCAL",
269269
)
@@ -339,10 +339,10 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
339339

340340
```python
341341
import httpx
342-
from stagehand import Browserbase, DefaultHttpxClient
342+
from stagehand import Stagehand, DefaultHttpxClient
343343

344-
client = Browserbase(
345-
# Or use the `BROWSERBASE_BASE_URL` env var
344+
client = Stagehand(
345+
# Or use the `STAGEHAND_BASE_URL` env var
346346
base_url="http://my.test.server.example.com:8083",
347347
http_client=DefaultHttpxClient(
348348
proxy="http://my.test.proxy.example.com",
@@ -362,9 +362,9 @@ client.with_options(http_client=DefaultHttpxClient(...))
362362
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.
363363

364364
```py
365-
from stagehand import Browserbase
365+
from stagehand import Stagehand
366366

367-
with Browserbase() as client:
367+
with Stagehand() as client:
368368
# make requests here
369369
...
370370

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by Browserbase, please follow the respective company's security reporting guidelines.
19+
or products provided by Stagehand, please follow the respective company's security reporting guidelines.
2020

2121
---
2222

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[project]
22
name = "stagehand"
33
version = "0.0.1"
4-
description = "The official Python library for the browserbase API"
4+
description = "The official Python library for the stagehand API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
77
authors = [
8-
{ name = "Browserbase", email = "" },
8+
{ name = "Stagehand", email = "" },
99
]
1010

1111
dependencies = [

src/stagehand/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
Client,
1111
Stream,
1212
Timeout,
13+
Stagehand,
1314
Transport,
1415
AsyncClient,
1516
AsyncStream,
16-
Browserbase,
17+
AsyncStagehand,
1718
RequestOptions,
18-
AsyncBrowserbase,
1919
)
2020
from ._models import BaseModel
2121
from ._version import __title__, __version__
@@ -27,9 +27,9 @@
2727
NotFoundError,
2828
APIStatusError,
2929
RateLimitError,
30+
StagehandError,
3031
APITimeoutError,
3132
BadRequestError,
32-
BrowserbaseError,
3333
APIConnectionError,
3434
AuthenticationError,
3535
InternalServerError,
@@ -52,7 +52,7 @@
5252
"not_given",
5353
"Omit",
5454
"omit",
55-
"BrowserbaseError",
55+
"StagehandError",
5656
"APIError",
5757
"APIStatusError",
5858
"APITimeoutError",
@@ -72,8 +72,8 @@
7272
"AsyncClient",
7373
"Stream",
7474
"AsyncStream",
75-
"Browserbase",
76-
"AsyncBrowserbase",
75+
"Stagehand",
76+
"AsyncStagehand",
7777
"ENVIRONMENTS",
7878
"file_from_path",
7979
"BaseModel",

0 commit comments

Comments
 (0)