hyperbrowser/is the Python package. Key areas:client/(sync + async clients and managers),models/(Pydantic request/response types),transport/(HTTP transport),tools/(tool schemas for integrations), plusconfig.pyandexceptions.py.tests/is reserved for test modules (currently minimal; add new tests here).README.mdcontains usage examples and API key setup.pyproject.tomldefines packaging metadata and dev tooling.
poetry install— set up the virtualenv with runtime and dev dependencies.poetry build— build source and wheel distributions.poetry run ruff check .— run lint checks (ruff is the only configured dev tool).poetry run ruff format .— format code with ruff.- Example run: create a small script using the README snippets and run with
python path/to/script.pyafter settingHYPERBROWSER_API_KEY.
- Python 3.8+ with 4‑space indentation.
- Naming:
snake_casefor modules/functions,CamelCasefor classes,UPPER_SNAKE_CASEfor constants. - Prefer type hints and Pydantic models for request/response schemas.
- Use
rufffor linting; keep code clean and import order consistent with ruff defaults.
- Tests live in
tests/and should followtest_*.pynaming. - No test framework is wired in yet; if you add tests, include
pytestin dev dependencies and document the command (e.g.,poetry run pytest).
- Recent commit messages are short, imperative, and often include a PR reference like
(#45). - Keep commits focused; include a clear summary and note user‑visible changes.
- PRs should describe the change, rationale, and any API impact; link issues when applicable and include small code examples for new features.
- Set
HYPERBROWSER_API_KEYvia environment variables or passapi_key=in client constructors. - Never commit API keys or session data; use
.envor local shell exports for development.