Migrating to the v1 Python SDK
browserbase.$thing_$do()
to browserbase.$thing.$do()
. For example:
load
, load_url
, and screenshot
have been fully removed in the v1 SDK. You can use the following example instead that encapsulates the same functionality using Playwright.
async_playwright
instead of sync_playwright
.
CreateSessionOptions
is a Pydantic object defined here.
create
method on sessions
.
BrowserSettings
and use Pydantic’s TypeAdapter
to conform JSON spec to the appropriate Pydantic class. You can also import each individual subclass.
browserbase.get_connect_url()
to create a new session and retrieve its connect url, or browserbase.get_connect_url(session_id=some_session.id)
to retrieve the connect url for an existing session.
In the v1 SDK, you can create a session and retrieve its connect url in a single call with bb.sessions.create()
:
browserbase.complete_session(session_id=some_session.id)
.
REQUEST_RELEASE
.
browserbase.$thing_$do()
to bb.$thing.$do()
.
retry_interval
is no longer supported. You can configure retries with the following syntax on bb init: