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.0.tar.gz (36.9 kB view details)

Uploaded Source

Built Distribution

coffeeblack-0.1.0-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coffeeblack-0.1.0.tar.gz
  • Upload date:
  • Size: 36.9 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.0.tar.gz
Algorithm Hash digest
SHA256 4f69aca1244c610585319f53a6d69be1978f74882f29c9b124d6265888965f27
MD5 6c94f4d4da2e5b124b7866e7af7cc520
BLAKE2b-256 d72eae66a660c9bac420d51fc902b9fab47e2cdbd6657972f566c6ccc6a644c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coffeeblack-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 40.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b6b17244386e9209cb0e624e5b721d0b48b60ff702e6d6147b16773496a7242
MD5 dcbe95a518ee27960668618b2448e175
BLAKE2b-256 b9595666b996424f6769c2b559ba49238f9bf28e661514c08014d79ee628deb1

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