cyberdesk 0.2.2__py3-none-any.whl → 0.2.3__py3-none-any.whl
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.
Potentially problematic release.
This version of cyberdesk might be problematic. Click here for more details.
- cyberdesk/__init__.py +7 -7
- cyberdesk/actions.py +37 -37
- cyberdesk/client.py +74 -74
- cyberdesk/types.py +49 -49
- {cyberdesk-0.2.2.dist-info → cyberdesk-0.2.3.dist-info}/METADATA +15 -5
- cyberdesk-0.2.3.dist-info/RECORD +9 -0
- {cyberdesk-0.2.2.dist-info → cyberdesk-0.2.3.dist-info}/WHEEL +1 -1
- {cyberdesk-0.2.2.dist-info → cyberdesk-0.2.3.dist-info}/licenses/LICENSE +20 -20
- cyberdesk-0.2.2.dist-info/RECORD +0 -9
- {cyberdesk-0.2.2.dist-info → cyberdesk-0.2.3.dist-info}/top_level.txt +0 -0
cyberdesk/__init__.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from .client import CyberdeskClient
|
|
2
|
-
from .types import (
|
|
3
|
-
GetDesktopParams,
|
|
4
|
-
LaunchDesktopParams,
|
|
5
|
-
TerminateDesktopParams,
|
|
6
|
-
ExecuteComputerActionParams,
|
|
7
|
-
ExecuteBashActionParams,
|
|
1
|
+
from .client import CyberdeskClient
|
|
2
|
+
from .types import (
|
|
3
|
+
GetDesktopParams,
|
|
4
|
+
LaunchDesktopParams,
|
|
5
|
+
TerminateDesktopParams,
|
|
6
|
+
ExecuteComputerActionParams,
|
|
7
|
+
ExecuteBashActionParams,
|
|
8
8
|
)
|
cyberdesk/actions.py
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
from .types import (
|
|
2
|
-
PostV1DesktopIdComputerActionClickMouseAction,
|
|
3
|
-
PostV1DesktopIdComputerActionDragMouseAction,
|
|
4
|
-
PostV1DesktopIdComputerActionGetCursorPositionAction,
|
|
5
|
-
PostV1DesktopIdComputerActionMoveMouseAction,
|
|
6
|
-
PostV1DesktopIdComputerActionPressKeysAction,
|
|
7
|
-
PostV1DesktopIdComputerActionScreenshotAction,
|
|
8
|
-
PostV1DesktopIdComputerActionScrollAction,
|
|
9
|
-
PostV1DesktopIdComputerActionTypeTextAction,
|
|
10
|
-
PostV1DesktopIdComputerActionWaitAction,
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
def click_mouse(x: int, y: int, button: str = "left") -> PostV1DesktopIdComputerActionClickMouseAction:
|
|
14
|
-
return PostV1DesktopIdComputerActionClickMouseAction(type="click_mouse", x=x, y=y, button=button)
|
|
15
|
-
|
|
16
|
-
def drag_mouse(start_x: int, start_y: int, end_x: int, end_y: int, button: str = "left") -> PostV1DesktopIdComputerActionDragMouseAction:
|
|
17
|
-
return PostV1DesktopIdComputerActionDragMouseAction(type="drag_mouse", start_x=start_x, start_y=start_y, end_x=end_x, end_y=end_y, button=button)
|
|
18
|
-
|
|
19
|
-
def get_cursor_position() -> PostV1DesktopIdComputerActionGetCursorPositionAction:
|
|
20
|
-
return PostV1DesktopIdComputerActionGetCursorPositionAction(type="get_cursor_position")
|
|
21
|
-
|
|
22
|
-
def move_mouse(x: int, y: int) -> PostV1DesktopIdComputerActionMoveMouseAction:
|
|
23
|
-
return PostV1DesktopIdComputerActionMoveMouseAction(type="move_mouse", x=x, y=y)
|
|
24
|
-
|
|
25
|
-
def press_keys(keys: list[str]) -> PostV1DesktopIdComputerActionPressKeysAction:
|
|
26
|
-
return PostV1DesktopIdComputerActionPressKeysAction(type="press_keys", keys=keys)
|
|
27
|
-
|
|
28
|
-
def screenshot() -> PostV1DesktopIdComputerActionScreenshotAction:
|
|
29
|
-
return PostV1DesktopIdComputerActionScreenshotAction(type="screenshot")
|
|
30
|
-
|
|
31
|
-
def scroll(dx: int, dy: int) -> PostV1DesktopIdComputerActionScrollAction:
|
|
32
|
-
return PostV1DesktopIdComputerActionScrollAction(type="scroll", dx=dx, dy=dy)
|
|
33
|
-
|
|
34
|
-
def type_text(text: str) -> PostV1DesktopIdComputerActionTypeTextAction:
|
|
35
|
-
return PostV1DesktopIdComputerActionTypeTextAction(type="type", text=text)
|
|
36
|
-
|
|
37
|
-
def wait(ms: int) -> PostV1DesktopIdComputerActionWaitAction:
|
|
1
|
+
from .types import (
|
|
2
|
+
PostV1DesktopIdComputerActionClickMouseAction,
|
|
3
|
+
PostV1DesktopIdComputerActionDragMouseAction,
|
|
4
|
+
PostV1DesktopIdComputerActionGetCursorPositionAction,
|
|
5
|
+
PostV1DesktopIdComputerActionMoveMouseAction,
|
|
6
|
+
PostV1DesktopIdComputerActionPressKeysAction,
|
|
7
|
+
PostV1DesktopIdComputerActionScreenshotAction,
|
|
8
|
+
PostV1DesktopIdComputerActionScrollAction,
|
|
9
|
+
PostV1DesktopIdComputerActionTypeTextAction,
|
|
10
|
+
PostV1DesktopIdComputerActionWaitAction,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
def click_mouse(x: int, y: int, button: str = "left") -> PostV1DesktopIdComputerActionClickMouseAction:
|
|
14
|
+
return PostV1DesktopIdComputerActionClickMouseAction(type="click_mouse", x=x, y=y, button=button)
|
|
15
|
+
|
|
16
|
+
def drag_mouse(start_x: int, start_y: int, end_x: int, end_y: int, button: str = "left") -> PostV1DesktopIdComputerActionDragMouseAction:
|
|
17
|
+
return PostV1DesktopIdComputerActionDragMouseAction(type="drag_mouse", start_x=start_x, start_y=start_y, end_x=end_x, end_y=end_y, button=button)
|
|
18
|
+
|
|
19
|
+
def get_cursor_position() -> PostV1DesktopIdComputerActionGetCursorPositionAction:
|
|
20
|
+
return PostV1DesktopIdComputerActionGetCursorPositionAction(type="get_cursor_position")
|
|
21
|
+
|
|
22
|
+
def move_mouse(x: int, y: int) -> PostV1DesktopIdComputerActionMoveMouseAction:
|
|
23
|
+
return PostV1DesktopIdComputerActionMoveMouseAction(type="move_mouse", x=x, y=y)
|
|
24
|
+
|
|
25
|
+
def press_keys(keys: list[str]) -> PostV1DesktopIdComputerActionPressKeysAction:
|
|
26
|
+
return PostV1DesktopIdComputerActionPressKeysAction(type="press_keys", keys=keys)
|
|
27
|
+
|
|
28
|
+
def screenshot() -> PostV1DesktopIdComputerActionScreenshotAction:
|
|
29
|
+
return PostV1DesktopIdComputerActionScreenshotAction(type="screenshot")
|
|
30
|
+
|
|
31
|
+
def scroll(dx: int, dy: int) -> PostV1DesktopIdComputerActionScrollAction:
|
|
32
|
+
return PostV1DesktopIdComputerActionScrollAction(type="scroll", dx=dx, dy=dy)
|
|
33
|
+
|
|
34
|
+
def type_text(text: str) -> PostV1DesktopIdComputerActionTypeTextAction:
|
|
35
|
+
return PostV1DesktopIdComputerActionTypeTextAction(type="type", text=text)
|
|
36
|
+
|
|
37
|
+
def wait(ms: int) -> PostV1DesktopIdComputerActionWaitAction:
|
|
38
38
|
return PostV1DesktopIdComputerActionWaitAction(type="wait", ms=ms)
|
cyberdesk/client.py
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Cyberdesk Python SDK wrapper client.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
from .types import (
|
|
6
|
-
GetDesktopParams,
|
|
7
|
-
TerminateDesktopParams,
|
|
8
|
-
ExecuteBashActionParams,
|
|
9
|
-
ComputerActionModel,
|
|
10
|
-
)
|
|
11
|
-
from openapi_client.api_reference_client.client import Client
|
|
12
|
-
from openapi_client.api_reference_client.api.desktop import (
|
|
13
|
-
get_v1_desktop_id,
|
|
14
|
-
post_v1_desktop,
|
|
15
|
-
post_v1_desktop_id_stop,
|
|
16
|
-
post_v1_desktop_id_computer_action,
|
|
17
|
-
post_v1_desktop_id_bash_action,
|
|
18
|
-
)
|
|
19
|
-
from openapi_client.api_reference_client.models import (
|
|
20
|
-
PostV1DesktopBody,
|
|
21
|
-
PostV1DesktopIdBashActionBody,
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
class CyberdeskClient:
|
|
25
|
-
"""
|
|
26
|
-
Wrapper client for the Cyberdesk API.
|
|
27
|
-
Provides both synchronous and asynchronous methods.
|
|
28
|
-
"""
|
|
29
|
-
def __init__(self, api_key: str, base_url: str = "https://api.cyberdesk.io"):
|
|
30
|
-
self.api_key = api_key
|
|
31
|
-
self.client = Client(base_url=base_url, headers={"x-api-key": api_key})
|
|
32
|
-
|
|
33
|
-
def get_desktop(self, id: GetDesktopParams):
|
|
34
|
-
"""Synchronous: Get details of a specific desktop instance."""
|
|
35
|
-
return get_v1_desktop_id.sync(id=id, client=self.client, x_api_key=self.api_key)
|
|
36
|
-
|
|
37
|
-
async def async_get_desktop(self, id: GetDesktopParams):
|
|
38
|
-
"""Async: Get details of a specific desktop instance. Use with 'await'."""
|
|
39
|
-
return await get_v1_desktop_id.asyncio(id=id, client=self.client, x_api_key=self.api_key)
|
|
40
|
-
|
|
41
|
-
def launch_desktop(self, timeout_ms: int = None):
|
|
42
|
-
"""Synchronous: Create a new virtual desktop instance."""
|
|
43
|
-
body = PostV1DesktopBody(timeout_ms=timeout_ms) if timeout_ms is not None else PostV1DesktopBody()
|
|
44
|
-
return post_v1_desktop.sync(client=self.client, body=body, x_api_key=self.api_key)
|
|
45
|
-
|
|
46
|
-
async def async_launch_desktop(self, timeout_ms: int = None):
|
|
47
|
-
"""Async: Create a new virtual desktop instance. Use with 'await'."""
|
|
48
|
-
body = PostV1DesktopBody(timeout_ms=timeout_ms) if timeout_ms is not None else PostV1DesktopBody()
|
|
49
|
-
return await post_v1_desktop.asyncio(client=self.client, body=body, x_api_key=self.api_key)
|
|
50
|
-
|
|
51
|
-
def terminate_desktop(self, id: TerminateDesktopParams):
|
|
52
|
-
"""Synchronous: Stop a running desktop instance."""
|
|
53
|
-
return post_v1_desktop_id_stop.sync(id=id, client=self.client, x_api_key=self.api_key)
|
|
54
|
-
|
|
55
|
-
async def async_terminate_desktop(self, id: TerminateDesktopParams):
|
|
56
|
-
"""Async: Stop a running desktop instance. Use with 'await'."""
|
|
57
|
-
return await post_v1_desktop_id_stop.asyncio(id=id, client=self.client, x_api_key=self.api_key)
|
|
58
|
-
|
|
59
|
-
def execute_computer_action(self, id: GetDesktopParams, action: ComputerActionModel):
|
|
60
|
-
"""Synchronous: Perform an action on the desktop (mouse, keyboard, etc)."""
|
|
61
|
-
return post_v1_desktop_id_computer_action.sync(id=id, client=self.client, body=action, x_api_key=self.api_key)
|
|
62
|
-
|
|
63
|
-
async def async_execute_computer_action(self, id: GetDesktopParams, action: ComputerActionModel):
|
|
64
|
-
"""Async: Perform an action on the desktop (mouse, keyboard, etc). Use with 'await'."""
|
|
65
|
-
return await post_v1_desktop_id_computer_action.asyncio(id=id, client=self.client, body=action, x_api_key=self.api_key)
|
|
66
|
-
|
|
67
|
-
def execute_bash_action(self, id: GetDesktopParams, command: ExecuteBashActionParams):
|
|
68
|
-
"""Synchronous: Execute a bash command on the desktop."""
|
|
69
|
-
body = PostV1DesktopIdBashActionBody(command=command)
|
|
70
|
-
return post_v1_desktop_id_bash_action.sync(id=id, client=self.client, body=body, x_api_key=self.api_key)
|
|
71
|
-
|
|
72
|
-
async def async_execute_bash_action(self, id: GetDesktopParams, command: ExecuteBashActionParams):
|
|
73
|
-
"""Async: Execute a bash command on the desktop. Use with 'await'."""
|
|
74
|
-
body = PostV1DesktopIdBashActionBody(command=command)
|
|
1
|
+
"""
|
|
2
|
+
Cyberdesk Python SDK wrapper client.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from .types import (
|
|
6
|
+
GetDesktopParams,
|
|
7
|
+
TerminateDesktopParams,
|
|
8
|
+
ExecuteBashActionParams,
|
|
9
|
+
ComputerActionModel,
|
|
10
|
+
)
|
|
11
|
+
from openapi_client.api_reference_client.client import Client
|
|
12
|
+
from openapi_client.api_reference_client.api.desktop import (
|
|
13
|
+
get_v1_desktop_id,
|
|
14
|
+
post_v1_desktop,
|
|
15
|
+
post_v1_desktop_id_stop,
|
|
16
|
+
post_v1_desktop_id_computer_action,
|
|
17
|
+
post_v1_desktop_id_bash_action,
|
|
18
|
+
)
|
|
19
|
+
from openapi_client.api_reference_client.models import (
|
|
20
|
+
PostV1DesktopBody,
|
|
21
|
+
PostV1DesktopIdBashActionBody,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
class CyberdeskClient:
|
|
25
|
+
"""
|
|
26
|
+
Wrapper client for the Cyberdesk API.
|
|
27
|
+
Provides both synchronous and asynchronous methods.
|
|
28
|
+
"""
|
|
29
|
+
def __init__(self, api_key: str, base_url: str = "https://api.cyberdesk.io"):
|
|
30
|
+
self.api_key = api_key
|
|
31
|
+
self.client = Client(base_url=base_url, headers={"x-api-key": api_key})
|
|
32
|
+
|
|
33
|
+
def get_desktop(self, id: GetDesktopParams):
|
|
34
|
+
"""Synchronous: Get details of a specific desktop instance."""
|
|
35
|
+
return get_v1_desktop_id.sync(id=id, client=self.client, x_api_key=self.api_key)
|
|
36
|
+
|
|
37
|
+
async def async_get_desktop(self, id: GetDesktopParams):
|
|
38
|
+
"""Async: Get details of a specific desktop instance. Use with 'await'."""
|
|
39
|
+
return await get_v1_desktop_id.asyncio(id=id, client=self.client, x_api_key=self.api_key)
|
|
40
|
+
|
|
41
|
+
def launch_desktop(self, timeout_ms: int = None):
|
|
42
|
+
"""Synchronous: Create a new virtual desktop instance."""
|
|
43
|
+
body = PostV1DesktopBody(timeout_ms=timeout_ms) if timeout_ms is not None else PostV1DesktopBody()
|
|
44
|
+
return post_v1_desktop.sync(client=self.client, body=body, x_api_key=self.api_key)
|
|
45
|
+
|
|
46
|
+
async def async_launch_desktop(self, timeout_ms: int = None):
|
|
47
|
+
"""Async: Create a new virtual desktop instance. Use with 'await'."""
|
|
48
|
+
body = PostV1DesktopBody(timeout_ms=timeout_ms) if timeout_ms is not None else PostV1DesktopBody()
|
|
49
|
+
return await post_v1_desktop.asyncio(client=self.client, body=body, x_api_key=self.api_key)
|
|
50
|
+
|
|
51
|
+
def terminate_desktop(self, id: TerminateDesktopParams):
|
|
52
|
+
"""Synchronous: Stop a running desktop instance."""
|
|
53
|
+
return post_v1_desktop_id_stop.sync(id=id, client=self.client, x_api_key=self.api_key)
|
|
54
|
+
|
|
55
|
+
async def async_terminate_desktop(self, id: TerminateDesktopParams):
|
|
56
|
+
"""Async: Stop a running desktop instance. Use with 'await'."""
|
|
57
|
+
return await post_v1_desktop_id_stop.asyncio(id=id, client=self.client, x_api_key=self.api_key)
|
|
58
|
+
|
|
59
|
+
def execute_computer_action(self, id: GetDesktopParams, action: ComputerActionModel):
|
|
60
|
+
"""Synchronous: Perform an action on the desktop (mouse, keyboard, etc)."""
|
|
61
|
+
return post_v1_desktop_id_computer_action.sync(id=id, client=self.client, body=action, x_api_key=self.api_key)
|
|
62
|
+
|
|
63
|
+
async def async_execute_computer_action(self, id: GetDesktopParams, action: ComputerActionModel):
|
|
64
|
+
"""Async: Perform an action on the desktop (mouse, keyboard, etc). Use with 'await'."""
|
|
65
|
+
return await post_v1_desktop_id_computer_action.asyncio(id=id, client=self.client, body=action, x_api_key=self.api_key)
|
|
66
|
+
|
|
67
|
+
def execute_bash_action(self, id: GetDesktopParams, command: ExecuteBashActionParams):
|
|
68
|
+
"""Synchronous: Execute a bash command on the desktop."""
|
|
69
|
+
body = PostV1DesktopIdBashActionBody(command=command)
|
|
70
|
+
return post_v1_desktop_id_bash_action.sync(id=id, client=self.client, body=body, x_api_key=self.api_key)
|
|
71
|
+
|
|
72
|
+
async def async_execute_bash_action(self, id: GetDesktopParams, command: ExecuteBashActionParams):
|
|
73
|
+
"""Async: Execute a bash command on the desktop. Use with 'await'."""
|
|
74
|
+
body = PostV1DesktopIdBashActionBody(command=command)
|
|
75
75
|
return await post_v1_desktop_id_bash_action.asyncio(id=id, client=self.client, body=body, x_api_key=self.api_key)
|
cyberdesk/types.py
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
from openapi_client.api_reference_client.models import (
|
|
2
|
-
PostV1DesktopBody,
|
|
3
|
-
PostV1DesktopIdComputerActionClickMouseAction,
|
|
4
|
-
PostV1DesktopIdComputerActionDragMouseAction,
|
|
5
|
-
PostV1DesktopIdComputerActionGetCursorPositionAction,
|
|
6
|
-
PostV1DesktopIdComputerActionMoveMouseAction,
|
|
7
|
-
PostV1DesktopIdComputerActionPressKeysAction,
|
|
8
|
-
PostV1DesktopIdComputerActionScreenshotAction,
|
|
9
|
-
PostV1DesktopIdComputerActionScrollAction,
|
|
10
|
-
PostV1DesktopIdComputerActionTypeTextAction,
|
|
11
|
-
PostV1DesktopIdComputerActionWaitAction,
|
|
12
|
-
)
|
|
13
|
-
from typing import Union
|
|
14
|
-
|
|
15
|
-
# Named parameter types for SDK methods
|
|
16
|
-
GetDesktopParams = str # Desktop ID
|
|
17
|
-
LaunchDesktopParams = PostV1DesktopBody
|
|
18
|
-
TerminateDesktopParams = str # Desktop ID
|
|
19
|
-
ExecuteBashActionParams = str # Command string
|
|
20
|
-
|
|
21
|
-
# Strongly-typed union for all computer action models
|
|
22
|
-
ComputerActionModel = Union[
|
|
23
|
-
PostV1DesktopIdComputerActionClickMouseAction,
|
|
24
|
-
PostV1DesktopIdComputerActionDragMouseAction,
|
|
25
|
-
PostV1DesktopIdComputerActionGetCursorPositionAction,
|
|
26
|
-
PostV1DesktopIdComputerActionMoveMouseAction,
|
|
27
|
-
PostV1DesktopIdComputerActionPressKeysAction,
|
|
28
|
-
PostV1DesktopIdComputerActionScreenshotAction,
|
|
29
|
-
PostV1DesktopIdComputerActionScrollAction,
|
|
30
|
-
PostV1DesktopIdComputerActionTypeTextAction,
|
|
31
|
-
PostV1DesktopIdComputerActionWaitAction,
|
|
32
|
-
]
|
|
33
|
-
|
|
34
|
-
# Re-export action models for ergonomic imports
|
|
35
|
-
__all__ = [
|
|
36
|
-
"GetDesktopParams",
|
|
37
|
-
"LaunchDesktopParams",
|
|
38
|
-
"TerminateDesktopParams",
|
|
39
|
-
"ExecuteBashActionParams",
|
|
40
|
-
"ComputerActionModel",
|
|
41
|
-
"PostV1DesktopIdComputerActionClickMouseAction",
|
|
42
|
-
"PostV1DesktopIdComputerActionDragMouseAction",
|
|
43
|
-
"PostV1DesktopIdComputerActionGetCursorPositionAction",
|
|
44
|
-
"PostV1DesktopIdComputerActionMoveMouseAction",
|
|
45
|
-
"PostV1DesktopIdComputerActionPressKeysAction",
|
|
46
|
-
"PostV1DesktopIdComputerActionScreenshotAction",
|
|
47
|
-
"PostV1DesktopIdComputerActionScrollAction",
|
|
48
|
-
"PostV1DesktopIdComputerActionTypeTextAction",
|
|
49
|
-
"PostV1DesktopIdComputerActionWaitAction",
|
|
1
|
+
from openapi_client.api_reference_client.models import (
|
|
2
|
+
PostV1DesktopBody,
|
|
3
|
+
PostV1DesktopIdComputerActionClickMouseAction,
|
|
4
|
+
PostV1DesktopIdComputerActionDragMouseAction,
|
|
5
|
+
PostV1DesktopIdComputerActionGetCursorPositionAction,
|
|
6
|
+
PostV1DesktopIdComputerActionMoveMouseAction,
|
|
7
|
+
PostV1DesktopIdComputerActionPressKeysAction,
|
|
8
|
+
PostV1DesktopIdComputerActionScreenshotAction,
|
|
9
|
+
PostV1DesktopIdComputerActionScrollAction,
|
|
10
|
+
PostV1DesktopIdComputerActionTypeTextAction,
|
|
11
|
+
PostV1DesktopIdComputerActionWaitAction,
|
|
12
|
+
)
|
|
13
|
+
from typing import Union
|
|
14
|
+
|
|
15
|
+
# Named parameter types for SDK methods
|
|
16
|
+
GetDesktopParams = str # Desktop ID
|
|
17
|
+
LaunchDesktopParams = PostV1DesktopBody
|
|
18
|
+
TerminateDesktopParams = str # Desktop ID
|
|
19
|
+
ExecuteBashActionParams = str # Command string
|
|
20
|
+
|
|
21
|
+
# Strongly-typed union for all computer action models
|
|
22
|
+
ComputerActionModel = Union[
|
|
23
|
+
PostV1DesktopIdComputerActionClickMouseAction,
|
|
24
|
+
PostV1DesktopIdComputerActionDragMouseAction,
|
|
25
|
+
PostV1DesktopIdComputerActionGetCursorPositionAction,
|
|
26
|
+
PostV1DesktopIdComputerActionMoveMouseAction,
|
|
27
|
+
PostV1DesktopIdComputerActionPressKeysAction,
|
|
28
|
+
PostV1DesktopIdComputerActionScreenshotAction,
|
|
29
|
+
PostV1DesktopIdComputerActionScrollAction,
|
|
30
|
+
PostV1DesktopIdComputerActionTypeTextAction,
|
|
31
|
+
PostV1DesktopIdComputerActionWaitAction,
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
# Re-export action models for ergonomic imports
|
|
35
|
+
__all__ = [
|
|
36
|
+
"GetDesktopParams",
|
|
37
|
+
"LaunchDesktopParams",
|
|
38
|
+
"TerminateDesktopParams",
|
|
39
|
+
"ExecuteBashActionParams",
|
|
40
|
+
"ComputerActionModel",
|
|
41
|
+
"PostV1DesktopIdComputerActionClickMouseAction",
|
|
42
|
+
"PostV1DesktopIdComputerActionDragMouseAction",
|
|
43
|
+
"PostV1DesktopIdComputerActionGetCursorPositionAction",
|
|
44
|
+
"PostV1DesktopIdComputerActionMoveMouseAction",
|
|
45
|
+
"PostV1DesktopIdComputerActionPressKeysAction",
|
|
46
|
+
"PostV1DesktopIdComputerActionScreenshotAction",
|
|
47
|
+
"PostV1DesktopIdComputerActionScrollAction",
|
|
48
|
+
"PostV1DesktopIdComputerActionTypeTextAction",
|
|
49
|
+
"PostV1DesktopIdComputerActionWaitAction",
|
|
50
50
|
]
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cyberdesk
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: The official Python SDK for Cyberdesk
|
|
5
5
|
Author-email: Cyberdesk Team <dev@cyberdesk.io>
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
License-File: LICENSE
|
|
9
9
|
Requires-Dist: httpx
|
|
10
|
+
Requires-Dist: openapi_client
|
|
10
11
|
Provides-Extra: dev
|
|
11
12
|
Requires-Dist: openapi-python-client; extra == "dev"
|
|
12
13
|
Requires-Dist: build; extra == "dev"
|
|
@@ -176,13 +177,22 @@ To build and publish this package to [PyPI](https://pypi.org/project/cyberdesk/)
|
|
|
176
177
|
uv pip install .[dev]
|
|
177
178
|
```
|
|
178
179
|
|
|
179
|
-
3. **
|
|
180
|
+
3. **Bump the version number** in `pyproject.toml` (e.g., `version = "0.2.4"`).
|
|
181
|
+
|
|
182
|
+
4. **Clean your `dist/` directory** before building to avoid 'File already exists' errors:
|
|
183
|
+
```bash
|
|
184
|
+
rm -rf dist/*
|
|
185
|
+
# On Windows PowerShell:
|
|
186
|
+
Remove-Item dist\* -Force
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
5. **Build the package:**
|
|
180
190
|
```bash
|
|
181
191
|
python -m build
|
|
182
192
|
```
|
|
183
193
|
This creates a `dist/` directory with `.whl` and `.tar.gz` files.
|
|
184
194
|
|
|
185
|
-
|
|
195
|
+
6. **(Recommended) Set up a `.pypirc` file for easy publishing:**
|
|
186
196
|
- Create a file named `.pypirc` in your home directory (e.g., `C:\Users\yourname\.pypirc` on Windows or `~/.pypirc` on Linux/macOS).
|
|
187
197
|
- Add:
|
|
188
198
|
```ini
|
|
@@ -195,14 +205,14 @@ To build and publish this package to [PyPI](https://pypi.org/project/cyberdesk/)
|
|
|
195
205
|
password = pypi-AgEIcH... # <-- paste your API token here
|
|
196
206
|
```
|
|
197
207
|
|
|
198
|
-
|
|
208
|
+
7. **Publish to PyPI:**
|
|
199
209
|
```bash
|
|
200
210
|
twine upload dist/*
|
|
201
211
|
```
|
|
202
212
|
- If you set up `.pypirc`, you won't be prompted for credentials.
|
|
203
213
|
- If not, enter `__token__` as the username and paste your API token as the password.
|
|
204
214
|
|
|
205
|
-
|
|
215
|
+
8. **Verify:**
|
|
206
216
|
- Visit https://pypi.org/project/cyberdesk/ to see your published package.
|
|
207
217
|
- Try installing it in a fresh environment:
|
|
208
218
|
```bash
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
cyberdesk/__init__.py,sha256=y9_g5NSt6hLmLsYLZuueIrRdQ_iT4EcAbbYwxPrjaHg,196
|
|
2
|
+
cyberdesk/actions.py,sha256=O8AV9hsPMvhSn2qZHaSuGfjMaAJeLoHdnd10LT_4_Ws,2069
|
|
3
|
+
cyberdesk/client.py,sha256=kxtkdh7AjNuXU8u2rAGhHQTuUKRLyXvX_h7jtdgLzrk,3807
|
|
4
|
+
cyberdesk/types.py,sha256=5jJSShzk3G8DqT0uRc8NFMlSru46tP9q3KJXcZhNRhc,1975
|
|
5
|
+
cyberdesk-0.2.3.dist-info/licenses/LICENSE,sha256=06Op63FCwGhuUOz__M8IZW5sxd29WxyGC4X5-Uih7IQ,1071
|
|
6
|
+
cyberdesk-0.2.3.dist-info/METADATA,sha256=9YWB0wG433HXaHeKbr7iWIeRd48Ts-t_BbZZ7zbEi8U,6435
|
|
7
|
+
cyberdesk-0.2.3.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
|
8
|
+
cyberdesk-0.2.3.dist-info/top_level.txt,sha256=CdS7JHYf_tUvJj-XyQ0reLcOLsfrzCFxWQS1apfMkGM,10
|
|
9
|
+
cyberdesk-0.2.3.dist-info/RECORD,,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 Cyberdesk Team
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Cyberdesk Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
cyberdesk-0.2.2.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
cyberdesk/__init__.py,sha256=6w_HoySYYfkbEefmGaG4X_YPsC899Rf5Bm_7I2h0hoU,203
|
|
2
|
-
cyberdesk/actions.py,sha256=QHDje98UhRRueTEc-nCV0NKJ_vLRGHtce1N_7b33si0,2106
|
|
3
|
-
cyberdesk/client.py,sha256=7o1bZDiUom_kB6dRnL_n1F0yDGBI5kT9oOCNbMhIKOI,3881
|
|
4
|
-
cyberdesk/types.py,sha256=n2x8OVVwOvkBkiNV5k6PQcMeFkNqCZ5u4bOC4Sm5rmk,2024
|
|
5
|
-
cyberdesk-0.2.2.dist-info/licenses/LICENSE,sha256=2KwiXv5ggnOI_pTkar6DJhkvlsThyfiA1-Q-CKTYP3U,1091
|
|
6
|
-
cyberdesk-0.2.2.dist-info/METADATA,sha256=x6EMfZz_pcVx_lbFst9etBa_gS6H16ExgidEk0xNe68,6130
|
|
7
|
-
cyberdesk-0.2.2.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
|
8
|
-
cyberdesk-0.2.2.dist-info/top_level.txt,sha256=CdS7JHYf_tUvJj-XyQ0reLcOLsfrzCFxWQS1apfMkGM,10
|
|
9
|
-
cyberdesk-0.2.2.dist-info/RECORD,,
|
|
File without changes
|