request-vm-on-golem 0.1.52__py3-none-any.whl → 0.1.53__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: request-vm-on-golem
3
- Version: 0.1.52
3
+ Version: 0.1.53
4
4
  Summary: VM on Golem Requestor CLI - Create and manage virtual machines on the Golem Network
5
5
  Keywords: golem,vm,cloud,decentralized,cli
6
6
  Author: Phillip Jensen
@@ -69,6 +69,12 @@ golem vm create my-vm --provider-id 0xProvider --cpu 2 --memory 4 --storage 20
69
69
  golem vm ssh my-vm
70
70
  ```
71
71
 
72
+ Check your installed version and whether an update is available:
73
+
74
+ ```bash
75
+ golem version
76
+ ```
77
+
72
78
  5) Stop or destroy when done:
73
79
 
74
80
  ```bash
@@ -1,7 +1,7 @@
1
1
  requestor/__init__.py,sha256=OqSUAh1uZBMx7GW0MoSMg967PVdmT8XdPJx3QYjwkak,116
2
2
  requestor/api/main.py,sha256=CTnaM7KyBtDwVlyclYbNDy-nGi5_xt9GTcGusRasDVY,2493
3
3
  requestor/cli/__init__.py,sha256=e3E4oEGxmGj-STPtFkQwg_qIWhR0JAiAQdw3G1hXciU,37
4
- requestor/cli/commands.py,sha256=LILQeW8-aqosSkCU4iVzov542y8m5bggSO4yJi__qSk,48544
4
+ requestor/cli/commands.py,sha256=5Nul0oxG_6n-EBqzQX3tO2N10uQpryyrmU9-HxFPovs,49539
5
5
  requestor/config.py,sha256=GPsr_NSj04MD40mH6xyVY5FB0ysFDwJk9FJ5h9OQuJ0,12716
6
6
  requestor/data/deployments/l2.json,sha256=XTNN2C5LkBfp4YbDKdUKfWMdp1fKnfv8D3TgcwVWxtQ,249
7
7
  requestor/db/__init__.py,sha256=Gm5DfWls6uvCZZ3HGGnyRHswbUQdeA5OGN8yPwH0hc8,88
@@ -22,7 +22,7 @@ requestor/ssh/__init__.py,sha256=hNgSqJ5s1_AwwxVRyFjUqh_LTBpI4Hmzq0F-f_wXN9g,119
22
22
  requestor/ssh/manager.py,sha256=3jQtbbK7CVC2yD1zCO88jGXh2fBcuv3CzWEqDLuaQVk,9758
23
23
  requestor/utils/logging.py,sha256=oFNpO8pJboYM8Wp7g3HOU4HFyBTKypVdY15lUiz1a4I,3721
24
24
  requestor/utils/spinner.py,sha256=PUHJdTD9jpUHur__01_qxXy87WFfNmjQbD_sLG-KlGo,2459
25
- request_vm_on_golem-0.1.52.dist-info/METADATA,sha256=Spq__-pjr5GGH2oN0FTrfFZ5EvmicP4l0IpCXoUQu2A,15687
26
- request_vm_on_golem-0.1.52.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
27
- request_vm_on_golem-0.1.52.dist-info/entry_points.txt,sha256=Z-skRNpJ8aZcIl_En9mEm1ygkp9FKy0bzQoL3zO52-0,44
28
- request_vm_on_golem-0.1.52.dist-info/RECORD,,
25
+ request_vm_on_golem-0.1.53.dist-info/METADATA,sha256=4JOUW7vkkFVjBgNv1zKVLz54hY0xWI2yVJFPc8LSI3E,15780
26
+ request_vm_on_golem-0.1.53.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
27
+ request_vm_on_golem-0.1.53.dist-info/entry_points.txt,sha256=Z-skRNpJ8aZcIl_En9mEm1ygkp9FKy0bzQoL3zO52-0,44
28
+ request_vm_on_golem-0.1.53.dist-info/RECORD,,
requestor/cli/commands.py CHANGED
@@ -5,6 +5,7 @@ import json
5
5
  from typing import Optional
6
6
  from pathlib import Path
7
7
  import subprocess
8
+ import os
8
9
  import aiohttp
9
10
  from tabulate import tabulate
10
11
  import uvicorn
@@ -89,6 +90,33 @@ def cli(network: str | None):
89
90
  pass
90
91
 
91
92
 
93
+ @cli.command(name="version")
94
+ def version_cmd():
95
+ """Show installed and latest versions from PyPI."""
96
+ pkg = "request-vm-on-golem"
97
+ try:
98
+ current = metadata.version(pkg)
99
+ except Exception:
100
+ current = "unknown"
101
+ latest = None
102
+ # Avoid network during pytest
103
+ if not os.environ.get("PYTEST_CURRENT_TEST"):
104
+ try:
105
+ import json as _json
106
+ from urllib.request import urlopen
107
+ with urlopen(f"https://pypi.org/pypi/{pkg}/json", timeout=5) as resp:
108
+ data = _json.loads(resp.read().decode("utf-8"))
109
+ latest = data.get("info", {}).get("version")
110
+ except Exception:
111
+ latest = None
112
+
113
+ if latest and latest != current:
114
+ click.echo(f"Requestor CLI: {current} (update available: {latest})")
115
+ click.echo("Update: pip install -U request-vm-on-golem")
116
+ else:
117
+ click.echo(f"Requestor CLI: {current} (up-to-date)" if latest else f"Requestor CLI: {current}")
118
+
119
+
92
120
  @cli.group()
93
121
  def vm():
94
122
  """VM management commands"""