Skip to main content

Python SDK for the use.computer macOS and iOS Computer Use API

Project description

use-computer Python SDK

Python client for use.computer — rent dedicated Mac minis with macOS and Apple simulator sandboxes built for computer-use agents.

pip install use-computer
export USE_COMPUTER_API_KEY=mk_live_...
from use_computer import Computer, SandboxType, SimulatorFamily

with Computer().create() as mac:
    mac.exec_ssh("open -a TextEdit")
    mac.keyboard.type("hello")
    png = mac.screenshot.take_full_screen()

with Computer().create(type=SandboxType.IOS, family=SimulatorFamily.TV) as tv:
    tv.screenshot.take_full_screen()

Full DSL reference (macOS + simulator): docs.use.computer/docs/sdk

Simulator sandboxes use type=SandboxType.IOS for the SDK route, but device_type and runtime can target any installed compatible CoreSimulator pair: iPhone or iPad with iOS, Apple Watch with watchOS, Apple TV with tvOS, or Apple Vision with visionOS. Prefer family=SimulatorFamily.TV/WATCH/VISION unless you need to pin raw CoreSimulator identifiers. Raw strings like type="ios" still work for compatibility. If omitted, the gateway defaults to iPhone 17 Pro on the latest installed iOS runtime.

Examples

File What it shows
examples/_1_hello_macos.py create → exec → keyboard → screenshot
examples/_2_hello_ios.py create simulator → open URL → screenshot
examples/_3_recording.py start / stop / download a screen recording
examples/_4_file_transfer.py upload bytes, download a file back
examples/_5_keepalive.py heartbeat for sessions idle > 2 min

For agent loops and evals: use-computer-cookbook.

Skill for AI coding assistants

Point your assistant at use-computer-cookbook/skills/SKILL.md — short body with per-topic references for macOS, Apple simulators, lifecycle, and the Harbor harness.

HTTP API

Every SDK method wraps https://api.use.computer/v1/... with Authorization: Bearer mk_live_.... Swagger: api.use.computer/docs. OpenAPI spec: api.use.computer/openapi.yaml.

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

use_computer-0.0.15.tar.gz (72.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

use_computer-0.0.15-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file use_computer-0.0.15.tar.gz.

File metadata

  • Download URL: use_computer-0.0.15.tar.gz
  • Upload date:
  • Size: 72.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for use_computer-0.0.15.tar.gz
Algorithm Hash digest
SHA256 0efc77927a872898c22a201ca44a2b2f4d2892376b66eb99fd19aa0c1ef4dba6
MD5 bd5ae81b384e24c96f6397c1df00932a
BLAKE2b-256 9b2da4d58d05d2fd20b2f192ba7fe7a415d4c6a742b7ce3275c89d76865b9229

See more details on using hashes here.

File details

Details for the file use_computer-0.0.15-py3-none-any.whl.

File metadata

  • Download URL: use_computer-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for use_computer-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 3f2748cb12406b71e69e2a8b86143bd1bdccaf160da5a32eb3ae1b73d21171ac
MD5 d9e22c0285b350104850378124e2b7f7
BLAKE2b-256 e42cf4bd03eaefa384586d1171a6f1df9dad069dbec1554838418e3702da4cf4

See more details on using hashes here.

Supported by

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