cyberdesk 0.2.2__tar.gz → 0.2.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.

Potentially problematic release.


This version of cyberdesk might be problematic. Click here for more details.

Files changed (143) hide show
  1. {cyberdesk-0.2.2 → cyberdesk-0.2.4}/LICENSE +20 -20
  2. {cyberdesk-0.2.2 → cyberdesk-0.2.4}/PKG-INFO +14 -5
  3. {cyberdesk-0.2.2 → cyberdesk-0.2.4}/README.md +209 -200
  4. {cyberdesk-0.2.2 → cyberdesk-0.2.4}/cyberdesk/__init__.py +7 -7
  5. {cyberdesk-0.2.2 → cyberdesk-0.2.4}/cyberdesk/actions.py +37 -37
  6. {cyberdesk-0.2.2 → cyberdesk-0.2.4}/cyberdesk/client.py +74 -74
  7. {cyberdesk-0.2.2 → cyberdesk-0.2.4}/cyberdesk/types.py +49 -49
  8. {cyberdesk-0.2.2 → cyberdesk-0.2.4}/cyberdesk.egg-info/PKG-INFO +14 -5
  9. cyberdesk-0.2.4/cyberdesk.egg-info/SOURCES.txt +139 -0
  10. cyberdesk-0.2.4/cyberdesk.egg-info/top_level.txt +2 -0
  11. cyberdesk-0.2.4/openapi_client/api_reference_client/__init__.py +8 -0
  12. cyberdesk-0.2.4/openapi_client/api_reference_client/api/__init__.py +1 -0
  13. cyberdesk-0.2.4/openapi_client/api_reference_client/api/desktop/__init__.py +1 -0
  14. cyberdesk-0.2.4/openapi_client/api_reference_client/api/desktop/get_v1_desktop_id.py +293 -0
  15. cyberdesk-0.2.4/openapi_client/api_reference_client/api/desktop/post_v1_desktop.py +294 -0
  16. cyberdesk-0.2.4/openapi_client/api_reference_client/api/desktop/post_v1_desktop_id_bash_action.py +307 -0
  17. cyberdesk-0.2.4/openapi_client/api_reference_client/api/desktop/post_v1_desktop_id_computer_action.py +419 -0
  18. cyberdesk-0.2.4/openapi_client/api_reference_client/api/desktop/post_v1_desktop_id_stop.py +288 -0
  19. cyberdesk-0.2.4/openapi_client/api_reference_client/client.py +268 -0
  20. cyberdesk-0.2.4/openapi_client/api_reference_client/errors.py +16 -0
  21. cyberdesk-0.2.4/openapi_client/api_reference_client/models/__init__.py +249 -0
  22. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_200.py +104 -0
  23. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_200_status.py +11 -0
  24. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_400.py +69 -0
  25. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_400_status.py +8 -0
  26. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_401.py +69 -0
  27. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_401_status.py +8 -0
  28. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_403.py +69 -0
  29. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_403_status.py +8 -0
  30. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_404.py +69 -0
  31. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_404_status.py +8 -0
  32. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_409.py +69 -0
  33. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_409_status.py +8 -0
  34. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_429.py +69 -0
  35. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_429_status.py +8 -0
  36. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_500.py +69 -0
  37. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_500_status.py +8 -0
  38. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_502.py +69 -0
  39. cyberdesk-0.2.4/openapi_client/api_reference_client/models/get_v1_desktop_id_response_502_status.py +8 -0
  40. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_body.py +59 -0
  41. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_body.py +59 -0
  42. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_200.py +79 -0
  43. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_400.py +69 -0
  44. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_400_status.py +8 -0
  45. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_401.py +69 -0
  46. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_401_status.py +8 -0
  47. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_403.py +69 -0
  48. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_403_status.py +8 -0
  49. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_404.py +69 -0
  50. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_404_status.py +8 -0
  51. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_409.py +69 -0
  52. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_409_status.py +8 -0
  53. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_429.py +69 -0
  54. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_429_status.py +8 -0
  55. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_500.py +69 -0
  56. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_500_status.py +8 -0
  57. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_502.py +69 -0
  58. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_bash_action_response_502_status.py +8 -0
  59. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action.py +133 -0
  60. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action_button.py +10 -0
  61. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action_click_type.py +10 -0
  62. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_click_mouse_action_type.py +8 -0
  63. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action.py +98 -0
  64. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action_end.py +71 -0
  65. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action_start.py +71 -0
  66. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_drag_mouse_action_type.py +8 -0
  67. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_get_cursor_position_action.py +64 -0
  68. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_get_cursor_position_action_type.py +8 -0
  69. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_move_mouse_action.py +80 -0
  70. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_move_mouse_action_type.py +8 -0
  71. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_press_keys_action.py +109 -0
  72. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_press_keys_action_key_action_type.py +10 -0
  73. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_press_keys_action_type.py +8 -0
  74. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_200.py +79 -0
  75. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_400.py +71 -0
  76. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_400_status.py +8 -0
  77. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_401.py +71 -0
  78. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_401_status.py +8 -0
  79. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_403.py +71 -0
  80. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_403_status.py +8 -0
  81. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_404.py +71 -0
  82. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_404_status.py +8 -0
  83. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_409.py +71 -0
  84. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_409_status.py +8 -0
  85. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_429.py +71 -0
  86. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_429_status.py +8 -0
  87. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_500.py +71 -0
  88. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_500_status.py +8 -0
  89. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_502.py +71 -0
  90. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_response_502_status.py +8 -0
  91. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_screenshot_action.py +63 -0
  92. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_screenshot_action_type.py +8 -0
  93. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_scroll_action.py +81 -0
  94. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_scroll_action_direction.py +11 -0
  95. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_scroll_action_type.py +8 -0
  96. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_type_text_action.py +71 -0
  97. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_type_text_action_type.py +8 -0
  98. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_wait_action.py +70 -0
  99. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_computer_action_wait_action_type.py +8 -0
  100. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_200.py +62 -0
  101. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_200_status.py +11 -0
  102. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_400.py +69 -0
  103. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_400_status.py +8 -0
  104. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_401.py +69 -0
  105. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_401_status.py +8 -0
  106. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_403.py +69 -0
  107. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_403_status.py +8 -0
  108. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_404.py +69 -0
  109. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_404_status.py +8 -0
  110. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_409.py +69 -0
  111. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_409_status.py +8 -0
  112. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_429.py +69 -0
  113. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_429_status.py +8 -0
  114. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_500.py +69 -0
  115. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_500_status.py +8 -0
  116. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_502.py +69 -0
  117. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_id_stop_response_502_status.py +8 -0
  118. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_200.py +70 -0
  119. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_200_status.py +11 -0
  120. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_400.py +69 -0
  121. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_400_status.py +8 -0
  122. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_401.py +69 -0
  123. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_401_status.py +8 -0
  124. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_403.py +69 -0
  125. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_403_status.py +8 -0
  126. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_404.py +69 -0
  127. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_404_status.py +8 -0
  128. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_409.py +69 -0
  129. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_409_status.py +8 -0
  130. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_429.py +69 -0
  131. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_429_status.py +8 -0
  132. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_500.py +69 -0
  133. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_500_status.py +8 -0
  134. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_502.py +69 -0
  135. cyberdesk-0.2.4/openapi_client/api_reference_client/models/post_v1_desktop_response_502_status.py +8 -0
  136. cyberdesk-0.2.4/openapi_client/api_reference_client/py.typed +1 -0
  137. cyberdesk-0.2.4/openapi_client/api_reference_client/types.py +46 -0
  138. {cyberdesk-0.2.2 → cyberdesk-0.2.4}/pyproject.toml +24 -24
  139. cyberdesk-0.2.2/cyberdesk.egg-info/SOURCES.txt +0 -12
  140. cyberdesk-0.2.2/cyberdesk.egg-info/top_level.txt +0 -1
  141. {cyberdesk-0.2.2 → cyberdesk-0.2.4}/cyberdesk.egg-info/dependency_links.txt +0 -0
  142. {cyberdesk-0.2.2 → cyberdesk-0.2.4}/cyberdesk.egg-info/requires.txt +0 -0
  143. {cyberdesk-0.2.2 → cyberdesk-0.2.4}/setup.cfg +0 -0
@@ -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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cyberdesk
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: The official Python SDK for Cyberdesk
5
5
  Author-email: Cyberdesk Team <dev@cyberdesk.io>
6
6
  License-Expression: MIT
@@ -176,13 +176,22 @@ To build and publish this package to [PyPI](https://pypi.org/project/cyberdesk/)
176
176
  uv pip install .[dev]
177
177
  ```
178
178
 
179
- 3. **Build the package:**
179
+ 3. **Bump the version number** in `pyproject.toml` (e.g., `version = "0.2.4"`).
180
+
181
+ 4. **Clean your `dist/` directory** before building to avoid 'File already exists' errors:
182
+ ```bash
183
+ rm -rf dist/*
184
+ # On Windows PowerShell:
185
+ Remove-Item dist\* -Force
186
+ ```
187
+
188
+ 5. **Build the package:**
180
189
  ```bash
181
190
  python -m build
182
191
  ```
183
192
  This creates a `dist/` directory with `.whl` and `.tar.gz` files.
184
193
 
185
- 4. **(Recommended) Set up a `.pypirc` file for easy publishing:**
194
+ 6. **(Recommended) Set up a `.pypirc` file for easy publishing:**
186
195
  - Create a file named `.pypirc` in your home directory (e.g., `C:\Users\yourname\.pypirc` on Windows or `~/.pypirc` on Linux/macOS).
187
196
  - Add:
188
197
  ```ini
@@ -195,14 +204,14 @@ To build and publish this package to [PyPI](https://pypi.org/project/cyberdesk/)
195
204
  password = pypi-AgEIcH... # <-- paste your API token here
196
205
  ```
197
206
 
198
- 5. **Publish to PyPI:**
207
+ 7. **Publish to PyPI:**
199
208
  ```bash
200
209
  twine upload dist/*
201
210
  ```
202
211
  - If you set up `.pypirc`, you won't be prompted for credentials.
203
212
  - If not, enter `__token__` as the username and paste your API token as the password.
204
213
 
205
- 6. **Verify:**
214
+ 8. **Verify:**
206
215
  - Visit https://pypi.org/project/cyberdesk/ to see your published package.
207
216
  - Try installing it in a fresh environment:
208
217
  ```bash
@@ -1,201 +1,210 @@
1
- # cyberdesk
2
-
3
- [![PyPI version](https://badge.fury.io/py/cyberdesk.svg)](https://badge.fury.io/py/cyberdesk)
4
-
5
- The official Python SDK for Cyberdesk.
6
-
7
- ## Installation
8
-
9
- ```bash
10
- pip install cyberdesk
11
- ```
12
-
13
- ## Usage
14
-
15
- First, create a Cyberdesk client instance with your API key:
16
-
17
- ```python
18
- from cyberdesk import CyberdeskClient
19
-
20
- client = CyberdeskClient(api_key="YOUR_API_KEY")
21
- ```
22
-
23
- ---
24
-
25
- ### Launch a Desktop
26
-
27
- ```python
28
- result = client.launch_desktop(timeout_ms=10000) # Optional: set a timeout for the desktop session
29
-
30
- # Error handling example
31
- if hasattr(result, 'error') and result.error:
32
- raise Exception('Failed to launch desktop: ' + str(result.error))
33
-
34
- # Success
35
- if hasattr(result, 'id'):
36
- desktop_id = result.id
37
- print('Launched desktop with ID:', desktop_id)
38
- ```
39
-
40
- ---
41
-
42
- ### Get Desktop Info
43
-
44
- ```python
45
- info = client.get_desktop("your-desktop-id")
46
-
47
- if hasattr(info, 'error') and info.error:
48
- raise Exception('Failed to get desktop info: ' + str(info.error))
49
-
50
- print('Desktop info:', info)
51
- ```
52
-
53
- ---
54
-
55
- ### Perform a Computer Action (e.g., Mouse Click)
56
-
57
- ```python
58
- from cyberdesk.actions import click_mouse
59
-
60
- action = click_mouse(x=100, y=150, button="left")
61
- action_result = client.execute_computer_action("your-desktop-id", action)
62
-
63
- if hasattr(action_result, 'error') and action_result.error:
64
- raise Exception('Action failed: ' + str(action_result.error))
65
-
66
- print('Action result:', action_result)
67
- ```
68
-
69
- ---
70
-
71
- ### Run a Bash Command
72
-
73
- ```python
74
- bash_result = client.execute_bash_action(
75
- "your-desktop-id",
76
- "echo Hello, world!"
77
- )
78
-
79
- if hasattr(bash_result, 'error') and bash_result.error:
80
- raise Exception('Bash command failed: ' + str(bash_result.error))
81
-
82
- print('Bash output:', getattr(bash_result, 'output', bash_result))
83
- ```
84
-
85
- ---
86
-
87
- ## Ergonomic, Type-Safe Actions
88
-
89
- To create computer actions (mouse, keyboard, etc.), use the factory functions in `cyberdesk.actions`. These provide full type hints and IDE autocompletion for all required and optional fields.
90
-
91
- **Example:**
92
- ```python
93
- from cyberdesk.actions import click_mouse, type_text
94
-
95
- action1 = click_mouse(x=100, y=200, button="left")
96
- action2 = type_text(text="Hello, world!")
97
-
98
- client.execute_computer_action("your-desktop-id", action1)
99
- client.execute_computer_action("your-desktop-id", action2)
100
- ```
101
-
102
- | Action | Factory Function | Description |
103
- |----------------|-------------------------|----------------------------|
104
- | Click Mouse | `click_mouse` | Mouse click at (x, y) |
105
- | Drag Mouse | `drag_mouse` | Mouse drag from/to (x, y) |
106
- | Move Mouse | `move_mouse` | Move mouse to (x, y) |
107
- | Scroll | `scroll` | Scroll by dx, dy |
108
- | Type Text | `type_text` | Type text |
109
- | Press Keys | `press_keys` | Press keyboard keys |
110
- | Screenshot | `screenshot` | Take a screenshot |
111
- | Wait | `wait` | Wait for ms milliseconds |
112
- | Get Cursor Pos | `get_cursor_position` | Get mouse cursor position |
113
-
114
- ---
115
-
116
- ## Async Usage
117
-
118
- All methods are also available as async variants (prefixed with `async_`). Example:
119
-
120
- ```python
121
- import asyncio
122
- from cyberdesk import CyberdeskClient
123
- from cyberdesk.actions import click_mouse
124
-
125
- async def main():
126
- client = CyberdeskClient(api_key="YOUR_API_KEY")
127
- result = await client.async_launch_desktop(timeout_ms=10000)
128
- print(result)
129
- # Example async computer action
130
- action = click_mouse(x=100, y=200)
131
- await client.async_execute_computer_action("your-desktop-id", action)
132
- # ... use other async_ methods as needed
133
-
134
- asyncio.run(main())
135
- ```
136
-
137
- ---
138
-
139
- ## Type Hints and Models
140
-
141
- All request/response types are available from the generated models, and all computer actions are available as factory functions in `cyberdesk.actions` for ergonomic, type-safe usage.
142
-
143
- ```python
144
- from cyberdesk.actions import click_mouse, drag_mouse, type_text, wait, scroll, move_mouse, press_keys, screenshot, get_cursor_position
145
- ```
146
-
147
- ---
148
-
149
- ## For Cyberdesk Team: Publishing to PyPI
150
-
151
- **Recommended:** Always use a [virtual environment](https://docs.python.org/3/library/venv.html) (venv) for building and publishing to avoid dependency conflicts.
152
-
153
- To build and publish this package to [PyPI](https://pypi.org/project/cyberdesk/):
154
-
155
- 1. **Log into PyPI** (get credentials from the Cyberdesk team).
156
-
157
- 2. **Install dev dependencies** (in a clean venv):
158
- ```bash
159
- pip install .[dev]
160
- # or
161
- uv pip install .[dev]
162
- ```
163
-
164
- 3. **Build the package:**
165
- ```bash
166
- python -m build
167
- ```
168
- This creates a `dist/` directory with `.whl` and `.tar.gz` files.
169
-
170
- 4. **(Recommended) Set up a `.pypirc` file for easy publishing:**
171
- - Create a file named `.pypirc` in your home directory (e.g., `C:\Users\yourname\.pypirc` on Windows or `~/.pypirc` on Linux/macOS).
172
- - Add:
173
- ```ini
174
- [distutils]
175
- index-servers =
176
- pypi
177
-
178
- [pypi]
179
- username = __token__
180
- password = pypi-AgEIcH... # <-- paste your API token here
181
- ```
182
-
183
- 5. **Publish to PyPI:**
184
- ```bash
185
- twine upload dist/*
186
- ```
187
- - If you set up `.pypirc`, you won't be prompted for credentials.
188
- - If not, enter `__token__` as the username and paste your API token as the password.
189
-
190
- 6. **Verify:**
191
- - Visit https://pypi.org/project/cyberdesk/ to see your published package.
192
- - Try installing it in a fresh environment:
193
- ```bash
194
- pip install cyberdesk
195
- ```
196
-
197
- ---
198
-
199
- ## License
200
-
1
+ # cyberdesk
2
+
3
+ [![PyPI version](https://badge.fury.io/py/cyberdesk.svg)](https://badge.fury.io/py/cyberdesk)
4
+
5
+ The official Python SDK for Cyberdesk.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pip install cyberdesk
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ First, create a Cyberdesk client instance with your API key:
16
+
17
+ ```python
18
+ from cyberdesk import CyberdeskClient
19
+
20
+ client = CyberdeskClient(api_key="YOUR_API_KEY")
21
+ ```
22
+
23
+ ---
24
+
25
+ ### Launch a Desktop
26
+
27
+ ```python
28
+ result = client.launch_desktop(timeout_ms=10000) # Optional: set a timeout for the desktop session
29
+
30
+ # Error handling example
31
+ if hasattr(result, 'error') and result.error:
32
+ raise Exception('Failed to launch desktop: ' + str(result.error))
33
+
34
+ # Success
35
+ if hasattr(result, 'id'):
36
+ desktop_id = result.id
37
+ print('Launched desktop with ID:', desktop_id)
38
+ ```
39
+
40
+ ---
41
+
42
+ ### Get Desktop Info
43
+
44
+ ```python
45
+ info = client.get_desktop("your-desktop-id")
46
+
47
+ if hasattr(info, 'error') and info.error:
48
+ raise Exception('Failed to get desktop info: ' + str(info.error))
49
+
50
+ print('Desktop info:', info)
51
+ ```
52
+
53
+ ---
54
+
55
+ ### Perform a Computer Action (e.g., Mouse Click)
56
+
57
+ ```python
58
+ from cyberdesk.actions import click_mouse
59
+
60
+ action = click_mouse(x=100, y=150, button="left")
61
+ action_result = client.execute_computer_action("your-desktop-id", action)
62
+
63
+ if hasattr(action_result, 'error') and action_result.error:
64
+ raise Exception('Action failed: ' + str(action_result.error))
65
+
66
+ print('Action result:', action_result)
67
+ ```
68
+
69
+ ---
70
+
71
+ ### Run a Bash Command
72
+
73
+ ```python
74
+ bash_result = client.execute_bash_action(
75
+ "your-desktop-id",
76
+ "echo Hello, world!"
77
+ )
78
+
79
+ if hasattr(bash_result, 'error') and bash_result.error:
80
+ raise Exception('Bash command failed: ' + str(bash_result.error))
81
+
82
+ print('Bash output:', getattr(bash_result, 'output', bash_result))
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Ergonomic, Type-Safe Actions
88
+
89
+ To create computer actions (mouse, keyboard, etc.), use the factory functions in `cyberdesk.actions`. These provide full type hints and IDE autocompletion for all required and optional fields.
90
+
91
+ **Example:**
92
+ ```python
93
+ from cyberdesk.actions import click_mouse, type_text
94
+
95
+ action1 = click_mouse(x=100, y=200, button="left")
96
+ action2 = type_text(text="Hello, world!")
97
+
98
+ client.execute_computer_action("your-desktop-id", action1)
99
+ client.execute_computer_action("your-desktop-id", action2)
100
+ ```
101
+
102
+ | Action | Factory Function | Description |
103
+ |----------------|-------------------------|----------------------------|
104
+ | Click Mouse | `click_mouse` | Mouse click at (x, y) |
105
+ | Drag Mouse | `drag_mouse` | Mouse drag from/to (x, y) |
106
+ | Move Mouse | `move_mouse` | Move mouse to (x, y) |
107
+ | Scroll | `scroll` | Scroll by dx, dy |
108
+ | Type Text | `type_text` | Type text |
109
+ | Press Keys | `press_keys` | Press keyboard keys |
110
+ | Screenshot | `screenshot` | Take a screenshot |
111
+ | Wait | `wait` | Wait for ms milliseconds |
112
+ | Get Cursor Pos | `get_cursor_position` | Get mouse cursor position |
113
+
114
+ ---
115
+
116
+ ## Async Usage
117
+
118
+ All methods are also available as async variants (prefixed with `async_`). Example:
119
+
120
+ ```python
121
+ import asyncio
122
+ from cyberdesk import CyberdeskClient
123
+ from cyberdesk.actions import click_mouse
124
+
125
+ async def main():
126
+ client = CyberdeskClient(api_key="YOUR_API_KEY")
127
+ result = await client.async_launch_desktop(timeout_ms=10000)
128
+ print(result)
129
+ # Example async computer action
130
+ action = click_mouse(x=100, y=200)
131
+ await client.async_execute_computer_action("your-desktop-id", action)
132
+ # ... use other async_ methods as needed
133
+
134
+ asyncio.run(main())
135
+ ```
136
+
137
+ ---
138
+
139
+ ## Type Hints and Models
140
+
141
+ All request/response types are available from the generated models, and all computer actions are available as factory functions in `cyberdesk.actions` for ergonomic, type-safe usage.
142
+
143
+ ```python
144
+ from cyberdesk.actions import click_mouse, drag_mouse, type_text, wait, scroll, move_mouse, press_keys, screenshot, get_cursor_position
145
+ ```
146
+
147
+ ---
148
+
149
+ ## For Cyberdesk Team: Publishing to PyPI
150
+
151
+ **Recommended:** Always use a [virtual environment](https://docs.python.org/3/library/venv.html) (venv) for building and publishing to avoid dependency conflicts.
152
+
153
+ To build and publish this package to [PyPI](https://pypi.org/project/cyberdesk/):
154
+
155
+ 1. **Log into PyPI** (get credentials from the Cyberdesk team).
156
+
157
+ 2. **Install dev dependencies** (in a clean venv):
158
+ ```bash
159
+ pip install .[dev]
160
+ # or
161
+ uv pip install .[dev]
162
+ ```
163
+
164
+ 3. **Bump the version number** in `pyproject.toml` (e.g., `version = "0.2.4"`).
165
+
166
+ 4. **Clean your `dist/` directory** before building to avoid 'File already exists' errors:
167
+ ```bash
168
+ rm -rf dist/*
169
+ # On Windows PowerShell:
170
+ Remove-Item dist\* -Force
171
+ ```
172
+
173
+ 5. **Build the package:**
174
+ ```bash
175
+ python -m build
176
+ ```
177
+ This creates a `dist/` directory with `.whl` and `.tar.gz` files.
178
+
179
+ 6. **(Recommended) Set up a `.pypirc` file for easy publishing:**
180
+ - Create a file named `.pypirc` in your home directory (e.g., `C:\Users\yourname\.pypirc` on Windows or `~/.pypirc` on Linux/macOS).
181
+ - Add:
182
+ ```ini
183
+ [distutils]
184
+ index-servers =
185
+ pypi
186
+
187
+ [pypi]
188
+ username = __token__
189
+ password = pypi-AgEIcH... # <-- paste your API token here
190
+ ```
191
+
192
+ 7. **Publish to PyPI:**
193
+ ```bash
194
+ twine upload dist/*
195
+ ```
196
+ - If you set up `.pypirc`, you won't be prompted for credentials.
197
+ - If not, enter `__token__` as the username and paste your API token as the password.
198
+
199
+ 8. **Verify:**
200
+ - Visit https://pypi.org/project/cyberdesk/ to see your published package.
201
+ - Try installing it in a fresh environment:
202
+ ```bash
203
+ pip install cyberdesk
204
+ ```
205
+
206
+ ---
207
+
208
+ ## License
209
+
201
210
  [MIT](LICENSE)
@@ -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
  )
@@ -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)