runtime-sdk 0.4.16__tar.gz → 0.4.18__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: runtime-sdk
3
- Version: 0.4.16
3
+ Version: 0.4.18
4
4
  Summary: Runtime Python SDK and CLI
5
5
  Project-URL: Repository, https://github.com/The-Money-Company-Limited/runtimevm
6
6
  Project-URL: Issues, https://github.com/The-Money-Company-Limited/runtimevm/issues
@@ -10,6 +10,9 @@ Classifier: Programming Language :: Python :: 3.12
10
10
  Classifier: Programming Language :: Python :: 3.13
11
11
  Classifier: Programming Language :: Python :: 3 :: Only
12
12
  Classifier: Environment :: Console
13
+ Classifier: Operating System :: MacOS :: MacOS X
14
+ Classifier: Operating System :: POSIX
15
+ Classifier: Operating System :: POSIX :: Linux
13
16
  Requires-Python: >=3.11
14
17
  Description-Content-Type: text/markdown
15
18
  Requires-Dist: httpx>=0.28.1
@@ -23,6 +26,10 @@ Python SDK and CLI for Runtime.
23
26
 
24
27
  ## Install
25
28
 
29
+ Supported host OS for the CLI: **macOS and Linux only**.
30
+
31
+ Windows is **not supported** at this time.
32
+
26
33
  ```bash
27
34
  uv tool install runtime-sdk
28
35
  ```
@@ -4,6 +4,10 @@ Python SDK and CLI for Runtime.
4
4
 
5
5
  ## Install
6
6
 
7
+ Supported host OS for the CLI: **macOS and Linux only**.
8
+
9
+ Windows is **not supported** at this time.
10
+
7
11
  ```bash
8
12
  uv tool install runtime-sdk
9
13
  ```
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "runtime-sdk"
3
- version = "0.4.16"
3
+ version = "0.4.18"
4
4
  description = "Runtime Python SDK and CLI"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -17,6 +17,9 @@ classifiers = [
17
17
  "Programming Language :: Python :: 3.13",
18
18
  "Programming Language :: Python :: 3 :: Only",
19
19
  "Environment :: Console",
20
+ "Operating System :: MacOS :: MacOS X",
21
+ "Operating System :: POSIX",
22
+ "Operating System :: POSIX :: Linux",
20
23
  ]
21
24
 
22
25
  [project.urls]
@@ -2,6 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import argparse
4
4
  import contextlib
5
+ import importlib
5
6
  import json
6
7
  import os
7
8
  import select
@@ -11,10 +12,8 @@ import signal
11
12
  import socket
12
13
  import subprocess
13
14
  import sys
14
- import termios
15
15
  import threading
16
16
  import time
17
- import tty
18
17
  import webbrowser
19
18
  from datetime import datetime, timezone
20
19
  from pathlib import Path
@@ -282,10 +281,18 @@ def build_parser() -> argparse.ArgumentParser:
282
281
  return parser
283
282
 
284
283
 
284
+ def _windows_unsupported() -> bool:
285
+ return sys.platform == "win32"
286
+
287
+
288
+
285
289
  def main(argv: list[str] | None = None) -> int:
286
290
  parser = build_parser()
287
291
  args = parser.parse_args(argv)
288
292
 
293
+ if _windows_unsupported():
294
+ return report_error("runtime-sdk supports macOS and Linux only; Windows is not supported")
295
+
289
296
  try:
290
297
  config = load_config()
291
298
  if args.base_url:
@@ -2311,12 +2318,25 @@ def _enter_computer(config: RuntimeConfig, computer_id: str) -> int:
2311
2318
  return report_error(f"terminal failed: {exc}")
2312
2319
 
2313
2320
 
2321
+ def _load_posix_tty_modules() -> tuple[Any, Any]:
2322
+ try:
2323
+ termios_mod = importlib.import_module("termios")
2324
+ tty_mod = importlib.import_module("tty")
2325
+ except ModuleNotFoundError as exc:
2326
+ raise RuntimeAPIError(
2327
+ "interactive console is not supported on this platform yet; use `runtime run` for one-shot commands"
2328
+ ) from exc
2329
+ return termios_mod, tty_mod
2330
+
2331
+
2332
+
2314
2333
  def _run_terminal_session(ws_url: str) -> int:
2315
2334
  if not sys.stdin.isatty() or not sys.stdout.isatty():
2316
2335
  return report_error("enter requires an interactive terminal")
2317
2336
 
2337
+ termios_mod, tty_mod = _load_posix_tty_modules()
2318
2338
  fd = sys.stdin.fileno()
2319
- old_settings = termios.tcgetattr(fd)
2339
+ old_settings = termios_mod.tcgetattr(fd)
2320
2340
  stop = threading.Event()
2321
2341
  result: dict[str, Any] = {"code": 0, "error": None}
2322
2342
  output_state: dict[str, Any] = {"buffer": "", "suppressing_preamble": True}
@@ -2369,7 +2389,7 @@ def _run_terminal_session(ws_url: str) -> int:
2369
2389
 
2370
2390
  last_size = shutil.get_terminal_size((100, 24))
2371
2391
  try:
2372
- tty.setraw(fd)
2392
+ tty_mod.setraw(fd)
2373
2393
  while not stop.is_set():
2374
2394
  current_size = shutil.get_terminal_size((100, 24))
2375
2395
  if current_size != last_size:
@@ -2388,7 +2408,7 @@ def _run_terminal_session(ws_url: str) -> int:
2388
2408
  stop.set()
2389
2409
  with contextlib.suppress(Exception):
2390
2410
  ws.close()
2391
- termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
2411
+ termios_mod.tcsetattr(fd, termios_mod.TCSADRAIN, old_settings)
2392
2412
  recv_thread.join(timeout=1)
2393
2413
 
2394
2414
  sys.stdout.write("\n")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: runtime-sdk
3
- Version: 0.4.16
3
+ Version: 0.4.18
4
4
  Summary: Runtime Python SDK and CLI
5
5
  Project-URL: Repository, https://github.com/The-Money-Company-Limited/runtimevm
6
6
  Project-URL: Issues, https://github.com/The-Money-Company-Limited/runtimevm/issues
@@ -10,6 +10,9 @@ Classifier: Programming Language :: Python :: 3.12
10
10
  Classifier: Programming Language :: Python :: 3.13
11
11
  Classifier: Programming Language :: Python :: 3 :: Only
12
12
  Classifier: Environment :: Console
13
+ Classifier: Operating System :: MacOS :: MacOS X
14
+ Classifier: Operating System :: POSIX
15
+ Classifier: Operating System :: POSIX :: Linux
13
16
  Requires-Python: >=3.11
14
17
  Description-Content-Type: text/markdown
15
18
  Requires-Dist: httpx>=0.28.1
@@ -23,6 +26,10 @@ Python SDK and CLI for Runtime.
23
26
 
24
27
  ## Install
25
28
 
29
+ Supported host OS for the CLI: **macOS and Linux only**.
30
+
31
+ Windows is **not supported** at this time.
32
+
26
33
  ```bash
27
34
  uv tool install runtime-sdk
28
35
  ```
File without changes