Fix malformed README quickstart fence and non-runnable timeout snippet

Open Beginner friendly
#176 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
documentation

Research direction

Start in README.md at lines 27-68 to inspect the quickstart fence, then review the timeout example at lines 230-247. Keep the full quickstart inside one Python fence and ensure the timeout snippet includes its required import. Render the README and run the standalone snippets to verify the examples are executable.

Written by the indexing model from the issue text.

Description

Description

The README quickstart closes its Python fence immediately after session creation (README.md:43), leaving the Playwright run() function as plain Markdown, then opens an unintended fence at README.md:67. This corrupts the rendered structure around the primary usage example and the following Examples section.

A second runnable-snippet problem appears in the timeout example: README.md:241 calls httpx.Timeout(...), but that code block imports only Browserbase and never imports httpx.

Reproduction

  1. Render README.md on GitHub/PyPI, or track fence state from lines 27-68.
  2. Observe that lines 46-66 are outside the Python block and line 68 (## Examples) is inside the next fence.
  3. Copy the timeout block at lines 230-247 into a Python process; it raises NameError: name 'httpx' is not defined at line 241.

Expected behavior

  • The entire quickstart (imports, session creation, run(), and main guard) should be within one Python fence.
  • Each advertised standalone snippet should contain the imports it needs, including import httpx for the granular timeout example.

Actual behavior

The primary README example is malformed when rendered, and the timeout example is not executable as shown.

Why it matters

README content is also used for the package metadata/PyPI page, so these errors affect the first-run path for both GitHub and PyPI users. A lightweight docs test that extracts/compiles Python fences would prevent recurrence.

Dominant language
Python
Stars
93
Forks
16
Avg merge
11m
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from browserbase/sdk-python

All issues in browserbase/sdk-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.