Spaces:
Sleeping
Sleeping
File size: 863 Bytes
d7b3d84 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | """Sandbox execution package for browser-use
This package provides type-safe sandbox code execution with SSE streaming.
Example:
from browser_use.sandbox import sandbox, SSEEvent, SSEEventType
@sandbox(log_level="INFO")
async def my_task(browser: Browser) -> str:
page = await browser.get_current_page()
await page.goto("https://example.com")
return await page.title()
result = await my_task()
"""
from browser_use.sandbox.sandbox import SandboxError, sandbox
from browser_use.sandbox.views import (
BrowserCreatedData,
ErrorData,
ExecutionResponse,
LogData,
ResultData,
SSEEvent,
SSEEventType,
)
__all__ = [
# Main decorator
'sandbox',
'SandboxError',
# Event types
'SSEEvent',
'SSEEventType',
# Event data models
'BrowserCreatedData',
'LogData',
'ResultData',
'ErrorData',
'ExecutionResponse',
]
|