This project has been archived by its maintainers, and is no longer receiving any updates.
Stagehand Python SDK
A Python SDK for BrowserBase Stagehand, enabling automated browser control and data extraction.
Installation
pip install stagehand-sdk
Usage
import asyncio
from stagehand import Stagehand
async def main():
# Initialize the Stagehand client
browser = Stagehand(
env="BROWSERBASE",
api_key="your-api-key",
project_id="your-project-id"
)
# Perform browser actions
result = await browser.act("Navigate to google.com")
# Extract data using a schema
data = await browser.extract("Get the search results", {
"results": [{"title": "string", "url": "string"}]
})
# Close the browser
await browser.close()
# Run the example
asyncio.run(main())
Configuration
env: Environment to use (default: "BROWSERBASE")api_key: Your BrowserBase API key (can also be set via BROWSERBASE_API_KEY environment variable)project_id: Your BrowserBase project ID (can also be set via BROWSERBASE_PROJECT_ID environment variable)verbose: Verbosity level (default: 0)
Features
- Automated browser control with natural language commands
- Data extraction with schema validation
- Async/await support
- Automatic NextJS server management
Requirements
- Python 3.7+
- httpx
- asyncio
License
MIT License
Metadata
Release files for stagehand-sdk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stagehand_sdk-0.1.0.tar.gz | 3.1 kB | Without provenance | Details for stagehand_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stagehand_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for stagehand_sdk-0.1.0-py3-none-any.whl |
Total release size: 6.4 kB
Release files / stagehand_sdk-0.1.0.tar.gz
| Download URL | stagehand_sdk-0.1.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e3631b089170a2e3c8309a0d68202449415be449b6b93c428b60ac9b4ed22bc
|
|
BLAKE2b-256 checksum How to use checksums |
a0a49ce518ad74e02952301696d1a39bc45a34b5babc0820e24ffb2454f581dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.9
|
Release files / stagehand_sdk-0.1.0-py3-none-any.whl
| Download URL | stagehand_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef88542bac541f0f295a1cb277bea4c7b285d0ad4503cd7e98fd38e7c8a7de79
|
|
BLAKE2b-256 checksum How to use checksums |
6e18ef04534d2329b5a4ffdc9f1826c249411e89c2c921feab1fc4a4483cba20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.9
|
Security for stagehand-sdk 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.