orgo 0.0.23__tar.gz → 0.0.24__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.
- {orgo-0.0.23 → orgo-0.0.24}/PKG-INFO +1 -1
- {orgo-0.0.23 → orgo-0.0.24}/pyproject.toml +1 -1
- {orgo-0.0.23 → orgo-0.0.24}/src/orgo/api/client.py +16 -1
- {orgo-0.0.23 → orgo-0.0.24}/src/orgo/computer.py +45 -0
- {orgo-0.0.23 → orgo-0.0.24}/src/orgo.egg-info/PKG-INFO +1 -1
- {orgo-0.0.23 → orgo-0.0.24}/README.md +0 -0
- {orgo-0.0.23 → orgo-0.0.24}/setup.cfg +0 -0
- {orgo-0.0.23 → orgo-0.0.24}/src/orgo/__init__.py +0 -0
- {orgo-0.0.23 → orgo-0.0.24}/src/orgo/api/__init__.py +0 -0
- {orgo-0.0.23 → orgo-0.0.24}/src/orgo/project.py +0 -0
- {orgo-0.0.23 → orgo-0.0.24}/src/orgo/prompt.py +0 -0
- {orgo-0.0.23 → orgo-0.0.24}/src/orgo/utils/__init__.py +0 -0
- {orgo-0.0.23 → orgo-0.0.24}/src/orgo/utils/auth.py +0 -0
- {orgo-0.0.23 → orgo-0.0.24}/src/orgo.egg-info/SOURCES.txt +0 -0
- {orgo-0.0.23 → orgo-0.0.24}/src/orgo.egg-info/dependency_links.txt +0 -0
- {orgo-0.0.23 → orgo-0.0.24}/src/orgo.egg-info/requires.txt +0 -0
- {orgo-0.0.23 → orgo-0.0.24}/src/orgo.egg-info/top_level.txt +0 -0
|
@@ -147,4 +147,19 @@ class ApiClient:
|
|
|
147
147
|
def wait(self, project_id: str, seconds: float) -> Dict[str, Any]:
|
|
148
148
|
return self._request("POST", f"computers/{project_id}/wait", {
|
|
149
149
|
"seconds": seconds
|
|
150
|
-
})
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
# Streaming methods
|
|
153
|
+
def start_stream(self, project_id: str, connection_name: str) -> Dict[str, Any]:
|
|
154
|
+
"""Start streaming to a configured RTMP connection"""
|
|
155
|
+
return self._request("POST", f"computers/{project_id}/stream/start", {
|
|
156
|
+
"connection_name": connection_name
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
def stop_stream(self, project_id: str) -> Dict[str, Any]:
|
|
160
|
+
"""Stop the active stream"""
|
|
161
|
+
return self._request("POST", f"computers/{project_id}/stream/stop")
|
|
162
|
+
|
|
163
|
+
def get_stream_status(self, project_id: str) -> Dict[str, Any]:
|
|
164
|
+
"""Get current stream status"""
|
|
165
|
+
return self._request("GET", f"computers/{project_id}/stream/status")
|
|
@@ -236,6 +236,51 @@ print(f"Files: {os.listdir('.')}")
|
|
|
236
236
|
"""Wait for specified number of seconds"""
|
|
237
237
|
return self.api.wait(self.project_id, seconds)
|
|
238
238
|
|
|
239
|
+
# Streaming methods
|
|
240
|
+
def start_stream(self, connection: str) -> Dict[str, Any]:
|
|
241
|
+
"""
|
|
242
|
+
Start streaming the computer screen to an RTMP server.
|
|
243
|
+
|
|
244
|
+
Args:
|
|
245
|
+
connection: Name of the RTMP connection configured in settings (e.g., "my-twitch-1")
|
|
246
|
+
|
|
247
|
+
Returns:
|
|
248
|
+
Dict with streaming status information
|
|
249
|
+
|
|
250
|
+
Example:
|
|
251
|
+
# First configure a connection in settings at https://www.orgo.ai/settings
|
|
252
|
+
# Then start streaming
|
|
253
|
+
computer.start_stream("my-twitch-1")
|
|
254
|
+
|
|
255
|
+
# Do your demo/automation
|
|
256
|
+
computer.type("Hello viewers!")
|
|
257
|
+
|
|
258
|
+
# Stop streaming when done
|
|
259
|
+
computer.stop_stream()
|
|
260
|
+
"""
|
|
261
|
+
return self.api.start_stream(self.project_id, connection)
|
|
262
|
+
|
|
263
|
+
def stop_stream(self) -> Dict[str, Any]:
|
|
264
|
+
"""
|
|
265
|
+
Stop the active stream.
|
|
266
|
+
|
|
267
|
+
Returns:
|
|
268
|
+
Dict with stop status information
|
|
269
|
+
"""
|
|
270
|
+
return self.api.stop_stream(self.project_id)
|
|
271
|
+
|
|
272
|
+
def stream_status(self) -> Dict[str, Any]:
|
|
273
|
+
"""
|
|
274
|
+
Get the current streaming status.
|
|
275
|
+
|
|
276
|
+
Returns:
|
|
277
|
+
Dict with keys:
|
|
278
|
+
- status: "idle", "streaming", or "terminated"
|
|
279
|
+
- start_time: ISO timestamp when stream started (if streaming)
|
|
280
|
+
- pid: Process ID of ffmpeg (if streaming)
|
|
281
|
+
"""
|
|
282
|
+
return self.api.get_stream_status(self.project_id)
|
|
283
|
+
|
|
239
284
|
# AI control method
|
|
240
285
|
def prompt(self,
|
|
241
286
|
instruction: str,
|
|
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
|