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.10.tar.gz
(8.7 kB
view details)
Built Distribution
File details
Details for the file scrapybara-0.1.10.tar.gz
.
File metadata
- Download URL: scrapybara-0.1.10.tar.gz
- Upload date:
- Size: 8.7 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 | 10822c65661d2e349c316600224c1300aea86296de2ca694c049708f6de4b634 |
|
MD5 | 0642d2f109510e5cfd714fdd8a3f8133 |
|
BLAKE2b-256 | 9d72d7a4eb5fff6ee61032fa7c18697daf2fcc7f51c9221f34afbcb316c63180 |
File details
Details for the file scrapybara-0.1.10-py3-none-any.whl
.
File metadata
- Download URL: scrapybara-0.1.10-py3-none-any.whl
- Upload date:
- Size: 11.2 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 | dd7dece1f3e475eec64cbbd2a5f124ffa636eb900fc74dd2d94b5966b9de5f04 |
|
MD5 | 4954774a7dd3dbec52d5b22aa3828a76 |
|
BLAKE2b-256 | b05e3d653abcc9983b29e3f2fe9230177083327b0d2c73264a840b6d68450f9e |