Metadata-Version: 2.4
Name: safebrowse-client
Version: 0.1.3
Summary: Thin Python client for the SafeBrowse localhost daemon
Author: RobKang1234
Maintainer: RobKang1234
License-Expression: LicenseRef-SafeBrowse-NC-1.0
Project-URL: Homepage, https://github.com/RobKang1234/safebrowse-sdk#readme
Project-URL: Documentation, https://github.com/RobKang1234/safebrowse-sdk#readme
Project-URL: Repository, https://github.com/RobKang1234/safebrowse-sdk
Project-URL: Issues, https://github.com/RobKang1234/safebrowse-sdk/issues
Keywords: agent-security,browser-agents,middleware,python-client,safebrowse
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# `safebrowse-client`

Thin Python client for the SafeBrowse localhost daemon.

## Install

```bash
pip install safebrowse-client
```

## Example

```python
from safebrowse_client import SafeBrowseClient

client = SafeBrowseClient("http://127.0.0.1:8787")
health = client.health()
print(health["status"])
```

This package is intentionally thin: policy enforcement lives in the SafeBrowse daemon.

## Model-Connected Browser Template

The release package also includes a starter template for a model-connected
browser agent that uses SafeBrowse while visiting normal external websites.

Generate a local copy:

```python
from safebrowse_client import write_model_connected_browser_agent_template

path = write_model_connected_browser_agent_template("model_connected_browser_agent.py")
print(path)
```

Or inspect the template string directly:

```python
from safebrowse_client import get_model_connected_browser_agent_template

print(get_model_connected_browser_agent_template())
```

The template is a real Python file with placeholders for:

- your model client
- Playwright browsing
- SafeBrowse observation checks
- SafeBrowse action gating before external navigation
- example public sites such as `https://arxiv.org` and `https://docs.python.org`

Repository:

- https://github.com/RobKang1234/safebrowse-sdk#readme
