Metadata-Version: 2.4
Name: meshbrow
Version: 0.1.0
Summary: Python SDK for Meshbrow — Managed Browser Fleet for AI Agents
Project-URL: Homepage, https://meshbrow.dev
Project-URL: Documentation, https://docs.meshbrow.dev
Project-URL: Repository, https://github.com/meshbrow-dev/meshbrow-python
Author-email: Bytangle <hello@meshbrow.dev>
License-Expression: MIT
Keywords: ai-agents,anti-detection,automation,browser,cdp,stealth
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: httpx>=0.25.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest-httpx>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1; extra == 'dev'
Description-Content-Type: text/markdown

# Meshbrow Python SDK

The official Python SDK for [Meshbrow](https://meshbrow.dev) — Managed Browser Fleet for AI Agents.

## Installation

```bash
pip install meshbrow
```

## Quick Start

```python
from meshbrow import Meshbrow

client = Meshbrow(api_key="your-api-key")

# Launch a stealth browser session
session = client.create_session(
    stealth="max",
    proxy_type="residential",
    proxy_country="US",
)

# Navigate and interact
client.navigate(session.id, "https://example.com")
content = client.extract(session.id)
screenshot = client.screenshot(session.id)

# Clean up
client.destroy_session(session.id)
client.close()
```

## Context Manager

```python
with Meshbrow(api_key="your-api-key") as client:
    session = client.create_session()
    client.navigate(session.id, "https://example.com")
    client.destroy_session(session.id)
```

## Fleet Operations

```python
fleet = client.create_fleet(
    count=10,
    proxy_type="residential",
    proxy_country="US",
)

for session in fleet.sessions:
    client.navigate(session.id, "https://example.com")

client.destroy_fleet(fleet.id)
```

## API Reference

### `Meshbrow(api_key, base_url="https://api.meshbrow.dev")`

| Method | Description |
|--------|-------------|
| `create_session(...)` | Launch a stealth browser session |
| `get_session(id)` | Get session details |
| `list_sessions()` | List all active sessions |
| `destroy_session(id)` | Destroy a session |
| `navigate(id, url)` | Navigate to URL |
| `screenshot(id)` | Take a screenshot |
| `click(id, selector)` | Click an element |
| `type_text(id, selector, text)` | Type into an input |
| `extract(id)` | Extract page text |
| `execute(id, script)` | Run JavaScript |
| `create_fleet(count)` | Launch multiple sessions |
| `destroy_fleet(id)` | Destroy a fleet |

## License

MIT
