Official Python client for Scrapybara
Project description
Scrapybara Python Client
Official Python client for Scrapybara ₍ᐢ•(ܫ)•ᐢ₎
Installation
pip install scrapybara
Usage
from scrapybara import Scrapybara
# Initialize the client
client = Scrapybara(api_key="your-api-key")
# Start a new instance and get its ID
instance = client.start()
# Interact with the instance
client.get(instance.instance_id)
client.computer(instance.instance_id, "mouse_move", [100, 200])
client.screenshot(instance.instance_id)
# Stop the instance
client.stop(instance.instance_id)
With Anthropic Computer Use
from scrapybara.anthropic import ComputerTool, EditTool, BashTool
# From https://github.com/anthropics/anthropic-quickstarts/blob/main/computer-use-demo
tool_collection = ToolCollection(
ComputerTool(client, instance.instance_id),
EditTool(client, instance.instance_id),
BashTool(client, instance.instance_id),
)
raw_response = client.beta.messages.with_raw_response.create(
max_tokens=max_tokens,
messages=messages,
model=model,
system=[system],
tools=tool_collection.to_params(),
betas=betas,
)
Requirements
- Python >= 3.8
requests
>= 2.25.1anthropic
^0.39.0pydantic
^2.0.0
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Feel free to submit an issue.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
scrapybara-0.1.8.tar.gz
(8.6 kB
view details)
Built Distribution
File details
Details for the file scrapybara-0.1.8.tar.gz
.
File metadata
- Download URL: scrapybara-0.1.8.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.5 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5f829f5725e9c24a0e827cd033dbc2214fba4c4e0e5946d856397a3c316f8b7 |
|
MD5 | 398a6f594e88e14cf1d128d79d12606f |
|
BLAKE2b-256 | e2f4963c75363f79f1bd3632961e5008a859d354db91f2f9030ca00533d85849 |
File details
Details for the file scrapybara-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: scrapybara-0.1.8-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.5 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edf2f0d45bfc4309f21e5eaeccfd3db7248ff1e7dfd3bf4a55db3b5792176eae |
|
MD5 | 211e664269b5939dfd9b400307585377 |
|
BLAKE2b-256 | 81552dbcb2b6a9d27409f219ab2ffc30e41f45d2c082a85855fbed789d1be913 |