use-computer Python SDK
use.computer gives you macOS sandboxes: VMs on dedicated Apple M4 Mac minis that you reserve for 24 hours or more, up to 2 VMs at a time per Mac.
pip install use-computer
export USE_COMPUTER_API_KEY=uc_live_...
Optional agent integrations are installed explicitly:
pip install "use-computer[agents]" # computer-use agents and provider SDKs
Base installs only the SDK client and httpx. The agents extra installs the agent runtime plus model-provider dependencies (Anthropic, OpenAI, Gemini, LiteLLM).
Quickstart
Flow: sign up → $100 starter credit → reserve a Mac mini (dashboard, or client.reserve(hours=24) in the SDK) → create() a macOS sandbox → drive it (mouse, keyboard, screenshot, exec, files, recording, UI tree, VNC) → delete(). Reservations cost $1.91/hour per Mac; the starter credit pays for them.
from use_computer import Computer
client = Computer()
# 1. Reserve one Mac Mini for 24 hours
reservation = client.reserve(hours=24)
# 2. Launch a macOS sandbox on the reserved Mac
with client.create(reservation_id=reservation.id) as mac:
# 3. Drive the macOS sandbox
mac.exec("open -a Safari")
mac.keyboard.type("hello from use.computer")
mac.mouse.click(500, 500)
png = mac.screenshot.take_full_screen()
print("VNC URL:", mac.vnc_url)
Each reserved Mac Mini supports up to 2 parallel macOS VMs. Check Computer().platforms(reservation_id=...)["macos"]["capacity"] for the selected reservation's max and used counts.
Sandboxes default to ephemeral=True, deleting automatically after the idle timeout (roughly 2 minutes without activity). Use ephemeral=False when a sandbox should persist until manual deletion, or call sandbox.start_keepalive(interval=30) during long model-think periods.
Runtime Snapshots
macOS snapshots let you seed a VM once, snapshot it, then create new sandboxes from that snapshot version. macOS snapshots preserve disk state, so installed apps, accounts, and seeded files are available immediately:
from use_computer import Computer
client = Computer()
# Configure the macOS desktop by hand over VNC, then snapshot it.
with client.create(type="macos") as mac:
print("Set up the macOS desktop here:", mac.vnc_url)
input("Press Enter once the desktop is ready to snapshot...")
snapshot = mac.snapshot("chrome-seeded-macos")
# New sandboxes boot from that saved disk state, no setup needed.
with client.create(type="macos", snapshot=snapshot.version) as seeded:
print("Seeded sandbox ready:", seeded.vnc_url)
Use client.snapshots() to list saved snapshot versions.
Examples
| File | What it shows |
|---|---|
examples/_1_hello_macos.py |
reserve → create → exec → keyboard → screenshot |
examples/_2_recording.py |
start / stop / download a screen recording |
examples/_3_file_transfer.py |
upload bytes, download a file back |
examples/_4_keepalive.py |
heartbeat for ephemeral sessions idle > 2 min |
examples/_5_snapshots.py |
snapshot seeded macOS state |
HTTP API
Every SDK method wraps https://api.use.computer/v1/... with Authorization: Bearer uc_live_.... Swagger: api.use.computer/docs. OpenAPI spec: api.use.computer/openapi.yaml.
Metadata
Release files for use-computer 0.0.46
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| use_computer-0.0.46.tar.gz | 460.9 kB | Without provenance | Details for use_computer-0.0.46.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| use_computer-0.0.46-py3-none-any.whl | Python 3 | none | any | Details for use_computer-0.0.46-py3-none-any.whl |
Total release size: 543.8 kB
Release files / use_computer-0.0.46.tar.gz
| Download URL | use_computer-0.0.46.tar.gz |
|---|---|
| Size | 460.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5167d6d9fa146cb14c84bee3916010c342c7e8cfe331a93dbf5db2216bf196c
|
|
BLAKE2b-256 checksum How to use checksums |
9698000d9d8ecef3bff34567f3176e7a246a521cc2268de6e9e83e8c8fcdbf7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / use_computer-0.0.46-py3-none-any.whl
| Download URL | use_computer-0.0.46-py3-none-any.whl |
|---|---|
| Size | 82.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a6a7ddabd280914826f8ed7817cc32c65ad591fa30e276e0d8671b778463e08
|
|
BLAKE2b-256 checksum How to use checksums |
a1fbd51d45eca4d15ee948ac4fe3947d439104be7a30cf04eb705d3218a40a84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for use-computer 0.0.46
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.