Skip to main content

Python client for interacting with the CoffeeBlack visual reasoning API

Project description

CoffeeBlack SDK

Python client for interacting with the CoffeeBlack visual reasoning API.

Installation

You can install the package locally using pip:

# Install from local directory
pip install -e .

# Or install from GitHub
pip install git+https://github.com/coffeeblack/sdk.git

Features

  • Find and interact with windows on your system
  • Take screenshots and send them to the CoffeeBlack API
  • Execute actions based on natural language queries
  • Reason about UI elements without executing actions
  • Find and launch applications with semantic search

Quick Start

import asyncio
from coffeeblack import CoffeeBlackSDK

async def main():
    # Initialize the SDK
    sdk = CoffeeBlackSDK()
    
    # Get all open windows
    windows = await sdk.get_open_windows()
    
    # Attach to a window by name
    await sdk.attach_to_window_by_name("Chrome")
    
    # Execute an action based on natural language
    response = await sdk.execute_action("Click on the search bar")
    
    # Type some text
    await sdk.press_key("Hello, world!")
    
    # Take a screenshot
    screenshot = await sdk.get_screenshot()

if __name__ == "__main__":
    asyncio.run(main())

License

MIT

Documentation

For more detailed documentation, please visit https://docs.coffeeblack.ai

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coffeeblack-0.1.1.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

coffeeblack-0.1.1-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file coffeeblack-0.1.1.tar.gz.

File metadata

  • Download URL: coffeeblack-0.1.1.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for coffeeblack-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0f8e5ede157f710c1979e58c269f49c6fa6fbf3eac18b1efc2f02d2e0a390b2f
MD5 9e2b15acae46f3724a16d66be37c69b8
BLAKE2b-256 205f5086e9c8cce3aa7dffcf8fd98a8a3da8f4a4e2bd9ce9ac9489065005b8e2

See more details on using hashes here.

File details

Details for the file coffeeblack-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: coffeeblack-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 28.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for coffeeblack-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0b523f264ffa049f8d87b0f1125e0b9607c04b3208c3b11defbb23857ddfecba
MD5 2c5e4fa1e5105adafa03e62f6d3fcecc
BLAKE2b-256 180f72a3ad33ce9f971861a9ece6f77d0723f5275b5aac3f731aae1eb87b4a4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page