Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ client = Browserbase(

session = client.sessions.create(
project_id="your_project_id",
proxies=True,
)
print(session.id)
```
Expand Down Expand Up @@ -65,7 +64,6 @@ client = AsyncBrowserbase(
async def main() -> None:
session = await client.sessions.create(
project_id="your_project_id",
proxies=True,
)
print(session.id)

Expand Down Expand Up @@ -102,7 +100,6 @@ client = Browserbase()
try:
client.sessions.create(
project_id="your_project_id",
proxies=True,
)
except browserbase.APIConnectionError as e:
print("The server could not be reached")
Expand Down Expand Up @@ -148,7 +145,6 @@ client = Browserbase(
# Or, configure per-request:
client.with_options(max_retries=5).sessions.create(
project_id="your_project_id",
proxies=True,
)
```

Expand All @@ -174,7 +170,6 @@ client = Browserbase(
# Override per-request:
client.with_options(timeout=5.0).sessions.create(
project_id="your_project_id",
proxies=True,
)
```

Expand Down Expand Up @@ -216,7 +211,6 @@ from browserbase import Browserbase
client = Browserbase()
response = client.sessions.with_raw_response.create(
project_id="your_project_id",
proxies=True,
)
print(response.headers.get('X-My-Header'))

Expand All @@ -237,7 +231,6 @@ To stream the response body, use `.with_streaming_response` instead, which requi
```python
with client.sessions.with_streaming_response.create(
project_id="your_project_id",
proxies=True,
) as response:
print(response.headers.get("X-My-Header"))

Expand Down
8 changes: 4 additions & 4 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No
with pytest.raises(APITimeoutError):
self.client.post(
"/v1/sessions",
body=cast(object, dict(project_id="your_project_id", proxies=True)),
body=cast(object, dict(project_id="your_project_id")),
cast_to=httpx.Response,
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
)
Expand All @@ -738,7 +738,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non
with pytest.raises(APIStatusError):
self.client.post(
"/v1/sessions",
body=cast(object, dict(project_id="your_project_id", proxies=True)),
body=cast(object, dict(project_id="your_project_id")),
cast_to=httpx.Response,
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
)
Expand Down Expand Up @@ -1503,7 +1503,7 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter)
with pytest.raises(APITimeoutError):
await self.client.post(
"/v1/sessions",
body=cast(object, dict(project_id="your_project_id", proxies=True)),
body=cast(object, dict(project_id="your_project_id")),
cast_to=httpx.Response,
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
)
Expand All @@ -1518,7 +1518,7 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter)
with pytest.raises(APIStatusError):
await self.client.post(
"/v1/sessions",
body=cast(object, dict(project_id="your_project_id", proxies=True)),
body=cast(object, dict(project_id="your_project_id")),
cast_to=httpx.Response,
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
)
Expand Down