use-computer 0.0.2__tar.gz → 0.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- use_computer-0.0.4/PKG-INFO +100 -0
- use_computer-0.0.4/README.md +78 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/pyproject.toml +2 -2
- use_computer-0.0.2/PKG-INFO +0 -49
- use_computer-0.0.2/README.md +0 -27
- {use_computer-0.0.2 → use_computer-0.0.4}/.env.example +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/.gitignore +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/.pre-commit-config.yaml +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/examples/ios_quickstart.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/examples/quickstart.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/examples/setup_with_exec.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/examples/upload_file.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/__init__.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/ax_transpile.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/client.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/display.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/errors.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/ios/__init__.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/ios/apps.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/ios/environment.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/ios/input.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/macos/__init__.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/macos/keyboard.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/macos/mouse.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/models.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/parsers.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/py.typed +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/recording.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/retry.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/sandbox.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/screenshot.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/tasks/__init__.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/tasks/templates/pre_command.sh +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/tasks/templates/task.toml +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/tasks/templates/test_ios.sh +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/tasks/templates/test_ios_nograder.sh +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/tasks/templates/test_macos.sh +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/tasks/templates/test_macos_check.sh +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/mmini/tasks/templates/test_macos_nograder.sh +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/use_computer/__init__.py +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/use_computer/py.typed +0 -0
- {use_computer-0.0.2 → use_computer-0.0.4}/uv.lock +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: use-computer
|
|
3
|
+
Version: 0.0.4
|
|
4
|
+
Summary: Python SDK for the use.computer macOS and iOS Computer Use API
|
|
5
|
+
Project-URL: Homepage, https://use.computer
|
|
6
|
+
Project-URL: Documentation, https://api.use.computer/docs
|
|
7
|
+
Project-URL: Repository, https://github.com/josancamon19/use-computer-python
|
|
8
|
+
Author: use.computer
|
|
9
|
+
Keywords: automation,computer-use,ios,macos,sandbox
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Requires-Dist: httpx>=0.27
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# use-computer Python SDK
|
|
24
|
+
|
|
25
|
+
Python client for use.computer macOS and iOS sandboxes.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install use-computer
|
|
29
|
+
export USE_COMPUTER_API_KEY=mk_live_...
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from use_computer import Computer
|
|
34
|
+
|
|
35
|
+
computer = Computer()
|
|
36
|
+
sandbox = computer.create() # macOS
|
|
37
|
+
|
|
38
|
+
try:
|
|
39
|
+
png = sandbox.screenshot.take_full_screen()
|
|
40
|
+
sandbox.mouse.click(500, 400)
|
|
41
|
+
sandbox.keyboard.type("hello")
|
|
42
|
+
sandbox.exec_ssh("open -a TextEdit")
|
|
43
|
+
finally:
|
|
44
|
+
sandbox.close()
|
|
45
|
+
computer.close()
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## iOS
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from use_computer import Computer
|
|
52
|
+
|
|
53
|
+
computer = Computer()
|
|
54
|
+
ios = computer.create(type="ios")
|
|
55
|
+
try:
|
|
56
|
+
ios.apps.open_url("https://example.com")
|
|
57
|
+
ios.input.tap(200, 300)
|
|
58
|
+
ios.input.type_text("hello")
|
|
59
|
+
ios.environment.set_appearance("dark")
|
|
60
|
+
finally:
|
|
61
|
+
ios.close()
|
|
62
|
+
computer.close()
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
In runner configs, use `platform: ios`; the runner calls the iOS SDK create path under the hood.
|
|
66
|
+
|
|
67
|
+
## Action DSL
|
|
68
|
+
|
|
69
|
+
Actions are dotted method calls plus args/kwargs. They are useful when a model emits tool-like steps. Given an open macOS `sandbox`:
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
from use_computer import Action, parse_pyautogui, parse_xdotool
|
|
73
|
+
|
|
74
|
+
actions = [
|
|
75
|
+
Action("mouse.move", [500, 400]),
|
|
76
|
+
Action("mouse.click", [500, 400]),
|
|
77
|
+
Action("keyboard.hotkey", ["command+space"]),
|
|
78
|
+
Action("keyboard.type", ["Safari"]),
|
|
79
|
+
Action("screenshot.take_full_screen"),
|
|
80
|
+
]
|
|
81
|
+
|
|
82
|
+
for action in actions:
|
|
83
|
+
action.execute(sandbox)
|
|
84
|
+
|
|
85
|
+
for action in parse_pyautogui("pyautogui.click(100, 200); pyautogui.write('hi')"):
|
|
86
|
+
action.execute(sandbox)
|
|
87
|
+
|
|
88
|
+
for action in parse_xdotool("xdotool mousemove 100 200 click 1 type hello"):
|
|
89
|
+
action.execute(sandbox)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Common macOS targets: `mouse.*`, `keyboard.*`, `screenshot.*`, `display.*`, `recording.*`.
|
|
93
|
+
|
|
94
|
+
Common iOS targets: `input.*`, `apps.*`, `environment.*`, `screenshot.*`, `recording.*`.
|
|
95
|
+
|
|
96
|
+
Docs: https://api.use.computer/docs
|
|
97
|
+
|
|
98
|
+
OpenAPI: https://api.use.computer/openapi.yaml
|
|
99
|
+
|
|
100
|
+
Runner: https://github.com/josancamon19/mmini-runner
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# use-computer Python SDK
|
|
2
|
+
|
|
3
|
+
Python client for use.computer macOS and iOS sandboxes.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install use-computer
|
|
7
|
+
export USE_COMPUTER_API_KEY=mk_live_...
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
```python
|
|
11
|
+
from use_computer import Computer
|
|
12
|
+
|
|
13
|
+
computer = Computer()
|
|
14
|
+
sandbox = computer.create() # macOS
|
|
15
|
+
|
|
16
|
+
try:
|
|
17
|
+
png = sandbox.screenshot.take_full_screen()
|
|
18
|
+
sandbox.mouse.click(500, 400)
|
|
19
|
+
sandbox.keyboard.type("hello")
|
|
20
|
+
sandbox.exec_ssh("open -a TextEdit")
|
|
21
|
+
finally:
|
|
22
|
+
sandbox.close()
|
|
23
|
+
computer.close()
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## iOS
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
from use_computer import Computer
|
|
30
|
+
|
|
31
|
+
computer = Computer()
|
|
32
|
+
ios = computer.create(type="ios")
|
|
33
|
+
try:
|
|
34
|
+
ios.apps.open_url("https://example.com")
|
|
35
|
+
ios.input.tap(200, 300)
|
|
36
|
+
ios.input.type_text("hello")
|
|
37
|
+
ios.environment.set_appearance("dark")
|
|
38
|
+
finally:
|
|
39
|
+
ios.close()
|
|
40
|
+
computer.close()
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
In runner configs, use `platform: ios`; the runner calls the iOS SDK create path under the hood.
|
|
44
|
+
|
|
45
|
+
## Action DSL
|
|
46
|
+
|
|
47
|
+
Actions are dotted method calls plus args/kwargs. They are useful when a model emits tool-like steps. Given an open macOS `sandbox`:
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
from use_computer import Action, parse_pyautogui, parse_xdotool
|
|
51
|
+
|
|
52
|
+
actions = [
|
|
53
|
+
Action("mouse.move", [500, 400]),
|
|
54
|
+
Action("mouse.click", [500, 400]),
|
|
55
|
+
Action("keyboard.hotkey", ["command+space"]),
|
|
56
|
+
Action("keyboard.type", ["Safari"]),
|
|
57
|
+
Action("screenshot.take_full_screen"),
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
for action in actions:
|
|
61
|
+
action.execute(sandbox)
|
|
62
|
+
|
|
63
|
+
for action in parse_pyautogui("pyautogui.click(100, 200); pyautogui.write('hi')"):
|
|
64
|
+
action.execute(sandbox)
|
|
65
|
+
|
|
66
|
+
for action in parse_xdotool("xdotool mousemove 100 200 click 1 type hello"):
|
|
67
|
+
action.execute(sandbox)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Common macOS targets: `mouse.*`, `keyboard.*`, `screenshot.*`, `display.*`, `recording.*`.
|
|
71
|
+
|
|
72
|
+
Common iOS targets: `input.*`, `apps.*`, `environment.*`, `screenshot.*`, `recording.*`.
|
|
73
|
+
|
|
74
|
+
Docs: https://api.use.computer/docs
|
|
75
|
+
|
|
76
|
+
OpenAPI: https://api.use.computer/openapi.yaml
|
|
77
|
+
|
|
78
|
+
Runner: https://github.com/josancamon19/mmini-runner
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "use-computer"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.4"
|
|
8
8
|
description = "Python SDK for the use.computer macOS and iOS Computer Use API"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -34,7 +34,7 @@ dev = [
|
|
|
34
34
|
|
|
35
35
|
[project.urls]
|
|
36
36
|
Homepage = "https://use.computer"
|
|
37
|
-
Documentation = "https://
|
|
37
|
+
Documentation = "https://api.use.computer/docs"
|
|
38
38
|
Repository = "https://github.com/josancamon19/use-computer-python"
|
|
39
39
|
|
|
40
40
|
[tool.hatch.build.targets.wheel]
|
use_computer-0.0.2/PKG-INFO
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: use-computer
|
|
3
|
-
Version: 0.0.2
|
|
4
|
-
Summary: Python SDK for the use.computer macOS and iOS Computer Use API
|
|
5
|
-
Project-URL: Homepage, https://use.computer
|
|
6
|
-
Project-URL: Documentation, https://docs.use.computer
|
|
7
|
-
Project-URL: Repository, https://github.com/josancamon19/use-computer-python
|
|
8
|
-
Author: use.computer
|
|
9
|
-
Keywords: automation,computer-use,ios,macos,sandbox
|
|
10
|
-
Classifier: Development Status :: 3 - Alpha
|
|
11
|
-
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: Operating System :: OS Independent
|
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
-
Classifier: Typing :: Typed
|
|
19
|
-
Requires-Python: >=3.10
|
|
20
|
-
Requires-Dist: httpx>=0.27
|
|
21
|
-
Description-Content-Type: text/markdown
|
|
22
|
-
|
|
23
|
-
# use-computer Python SDK
|
|
24
|
-
|
|
25
|
-
Python client for the use.computer macOS and iOS Computer Use API.
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
pip install use-computer
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
```python
|
|
32
|
-
from use_computer import Computer
|
|
33
|
-
|
|
34
|
-
computer = Computer(api_key="mk_live_...")
|
|
35
|
-
sandbox = computer.create()
|
|
36
|
-
|
|
37
|
-
image = sandbox.screenshot.take_full_screen()
|
|
38
|
-
sandbox.mouse.click(500, 400)
|
|
39
|
-
sandbox.keyboard.type("hello")
|
|
40
|
-
|
|
41
|
-
sandbox.close()
|
|
42
|
-
computer.close()
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Docs: https://docs.use.computer
|
|
46
|
-
|
|
47
|
-
Runner repo: https://github.com/josancamon19/mmini-runner
|
|
48
|
-
|
|
49
|
-
API reference: https://admin.api.use.computer/docs
|
use_computer-0.0.2/README.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# use-computer Python SDK
|
|
2
|
-
|
|
3
|
-
Python client for the use.computer macOS and iOS Computer Use API.
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
pip install use-computer
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
```python
|
|
10
|
-
from use_computer import Computer
|
|
11
|
-
|
|
12
|
-
computer = Computer(api_key="mk_live_...")
|
|
13
|
-
sandbox = computer.create()
|
|
14
|
-
|
|
15
|
-
image = sandbox.screenshot.take_full_screen()
|
|
16
|
-
sandbox.mouse.click(500, 400)
|
|
17
|
-
sandbox.keyboard.type("hello")
|
|
18
|
-
|
|
19
|
-
sandbox.close()
|
|
20
|
-
computer.close()
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Docs: https://docs.use.computer
|
|
24
|
-
|
|
25
|
-
Runner repo: https://github.com/josancamon19/mmini-runner
|
|
26
|
-
|
|
27
|
-
API reference: https://admin.api.use.computer/docs
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|