use-computer 0.0.16__tar.gz → 0.0.17__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.16 → use_computer-0.0.17}/PKG-INFO +4 -1
- {use_computer-0.0.16 → use_computer-0.0.17}/README.md +3 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/pyproject.toml +1 -1
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/ios/input.py +18 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/sandbox.py +1 -1
- {use_computer-0.0.16 → use_computer-0.0.17}/.env.example +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/.gitignore +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/.pre-commit-config.yaml +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/examples/_1_hello_macos.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/examples/_2_hello_ios.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/examples/_3_recording.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/examples/_4_file_transfer.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/examples/_5_keepalive.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/__init__.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/accessibility.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/ax_transpile.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/client.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/display.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/errors.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/ios/__init__.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/ios/apps.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/ios/environment.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/macos/__init__.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/macos/keyboard.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/macos/mouse.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/models.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/parsers.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/py.typed +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/recording.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/retry.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/screenshot.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/simulators.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/tasks/__init__.py +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/tasks/templates/pre_command.sh +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/tasks/templates/task.toml +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/tasks/templates/test_ios.sh +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/tasks/templates/test_ios_nograder.sh +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/tasks/templates/test_macos.sh +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/tasks/templates/test_macos_check.sh +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/use_computer/tasks/templates/test_macos_nograder.sh +0 -0
- {use_computer-0.0.16 → use_computer-0.0.17}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: use-computer
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.17
|
|
4
4
|
Summary: Python SDK for the use.computer macOS and iOS Computer Use API
|
|
5
5
|
Project-URL: Homepage, https://use.computer
|
|
6
6
|
Project-URL: Documentation, https://api.use.computer/docs
|
|
@@ -40,6 +40,9 @@ with Computer().create() as mac:
|
|
|
40
40
|
with Computer().create(type=SandboxType.IOS, family=SimulatorFamily.TV) as tv:
|
|
41
41
|
tv.screenshot.take_full_screen()
|
|
42
42
|
tv.input.press_remote("select")
|
|
43
|
+
|
|
44
|
+
with Computer().create(type=SandboxType.IOS) as ios:
|
|
45
|
+
ios.input.long_press(120, 300, duration=1.0)
|
|
43
46
|
```
|
|
44
47
|
|
|
45
48
|
Full DSL reference (macOS + simulator): [docs.use.computer/docs/sdk](https://docs.use.computer/docs/sdk)
|
|
@@ -18,6 +18,9 @@ with Computer().create() as mac:
|
|
|
18
18
|
with Computer().create(type=SandboxType.IOS, family=SimulatorFamily.TV) as tv:
|
|
19
19
|
tv.screenshot.take_full_screen()
|
|
20
20
|
tv.input.press_remote("select")
|
|
21
|
+
|
|
22
|
+
with Computer().create(type=SandboxType.IOS) as ios:
|
|
23
|
+
ios.input.long_press(120, 300, duration=1.0)
|
|
21
24
|
```
|
|
22
25
|
|
|
23
26
|
Full DSL reference (macOS + simulator): [docs.use.computer/docs/sdk](https://docs.use.computer/docs/sdk)
|
|
@@ -65,6 +65,15 @@ class Input:
|
|
|
65
65
|
resp.raise_for_status()
|
|
66
66
|
return ActionResult.from_dict(resp.json())
|
|
67
67
|
|
|
68
|
+
def long_press(self, x: float, y: float, duration: float = 1.0) -> ActionResult:
|
|
69
|
+
"""Hold a touch at coordinates for duration seconds."""
|
|
70
|
+
resp = self._http.post(
|
|
71
|
+
f"{self._prefix}/long_press",
|
|
72
|
+
json={"x": x, "y": y, "duration": duration},
|
|
73
|
+
)
|
|
74
|
+
resp.raise_for_status()
|
|
75
|
+
return ActionResult.from_dict(resp.json())
|
|
76
|
+
|
|
68
77
|
def swipe(self, from_x: float, from_y: float, to_x: float, to_y: float) -> ActionResult:
|
|
69
78
|
resp = self._http.post(
|
|
70
79
|
f"{self._prefix}/swipe",
|
|
@@ -110,6 +119,15 @@ class AsyncInput:
|
|
|
110
119
|
resp.raise_for_status()
|
|
111
120
|
return ActionResult.from_dict(resp.json())
|
|
112
121
|
|
|
122
|
+
async def long_press(self, x: float, y: float, duration: float = 1.0) -> ActionResult:
|
|
123
|
+
"""Hold a touch at coordinates for duration seconds."""
|
|
124
|
+
resp = await self._http.post(
|
|
125
|
+
f"{self._prefix}/long_press",
|
|
126
|
+
json={"x": x, "y": y, "duration": duration},
|
|
127
|
+
)
|
|
128
|
+
resp.raise_for_status()
|
|
129
|
+
return ActionResult.from_dict(resp.json())
|
|
130
|
+
|
|
113
131
|
async def swipe(self, from_x: float, from_y: float, to_x: float, to_y: float) -> ActionResult:
|
|
114
132
|
resp = await self._http.post(
|
|
115
133
|
f"{self._prefix}/swipe",
|
|
@@ -243,7 +243,7 @@ class MacOSSandbox(Sandbox):
|
|
|
243
243
|
|
|
244
244
|
|
|
245
245
|
class IOSSandbox(Sandbox):
|
|
246
|
-
"""iOS simulator sandbox — tap, swipe,
|
|
246
|
+
"""iOS simulator sandbox — tap, long press, swipe, buttons, apps."""
|
|
247
247
|
|
|
248
248
|
def __init__(self, sandbox_id: str, http: httpx.Client):
|
|
249
249
|
super().__init__(sandbox_id, SandboxType.IOS, http)
|
|
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
|
{use_computer-0.0.16 → use_computer-0.0.17}/use_computer/tasks/templates/test_ios_nograder.sh
RENAMED
|
File without changes
|
|
File without changes
|
{use_computer-0.0.16 → use_computer-0.0.17}/use_computer/tasks/templates/test_macos_check.sh
RENAMED
|
File without changes
|
{use_computer-0.0.16 → use_computer-0.0.17}/use_computer/tasks/templates/test_macos_nograder.sh
RENAMED
|
File without changes
|
|
File without changes
|