nextmv 0.38.0.dev0__py3-none-any.whl → 0.39.0.dev0__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.
nextmv/__about__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "v0.38.0.dev0"
1
+ __version__ = "v0.39.0.dev0"
nextmv/cli/__init__.py ADDED
File without changes
nextmv/cli/main.py ADDED
@@ -0,0 +1,11 @@
1
+ import typer
2
+
3
+ from nextmv.cli.version import app as version_app
4
+
5
+ app = typer.Typer(
6
+ help="The Nextmv Command Line Interface (CLI).",
7
+ epilog="[italic]:rabbit: Made with :heart: by Nextmv.[/italic]",
8
+ rich_markup_mode="rich",
9
+ context_settings={"help_option_names": ["--help", "-h"]},
10
+ )
11
+ app.add_typer(version_app)
nextmv/cli/version.py ADDED
@@ -0,0 +1,14 @@
1
+ import typer
2
+ from rich import print
3
+
4
+ from nextmv.__about__ import __version__
5
+
6
+ app = typer.Typer()
7
+
8
+
9
+ @app.command()
10
+ def version() -> str:
11
+ """
12
+ Show the current version of the Nextmv CLI.
13
+ """
14
+ print(__version__)
@@ -2548,7 +2548,7 @@ class Application:
2548
2548
 
2549
2549
  Retrieves a list of assets associated with a specific run. This method ONLY
2550
2550
  returns the asset metadata, the content needs to be fetched via the
2551
- `download_asset` method.
2551
+ `download_asset_content` method.
2552
2552
 
2553
2553
  Parameters
2554
2554
  ----------
@@ -2582,9 +2582,13 @@ class Application:
2582
2582
  asset_data["run_id"] = run_id
2583
2583
  return [RunAsset.from_dict(asset) for asset in assets_data]
2584
2584
 
2585
- def download_asset(self, asset: RunAsset, destination: str | pathlib.Path | io.BytesIO | None = None) -> Any | None:
2585
+ def download_asset_content(
2586
+ self,
2587
+ asset: RunAsset,
2588
+ destination: str | pathlib.Path | io.BytesIO | None = None,
2589
+ ) -> Any | None:
2586
2590
  """
2587
- Downloads an asset to a specified destination.
2591
+ Downloads an asset's content to a specified destination.
2588
2592
 
2589
2593
  Parameters
2590
2594
  ----------
@@ -2599,10 +2603,10 @@ class Application:
2599
2603
  Returns
2600
2604
  -------
2601
2605
  Any or None
2602
- If ``destination`` is None, returns the asset content: for JSON assets, a
2603
- ``dict`` parsed from the JSON response; for other asset types, the raw
2604
- ``bytes`` content. If ``destination`` is provided, the content is written
2605
- to the given destination and the method returns ``None``.
2606
+ If `destination` is None, returns the asset content: for JSON assets, a
2607
+ `dict` parsed from the JSON response; for other asset types, the raw
2608
+ `bytes` content. If `destination` is provided, the content is written
2609
+ to the given destination and the method returns `None`.
2606
2610
 
2607
2611
  Raises
2608
2612
  ------
@@ -2614,13 +2618,13 @@ class Application:
2614
2618
  >>> assets = app.list_assets("run-123")
2615
2619
  >>> asset = assets[0] # Assume we want to download the first asset
2616
2620
  >>> # Download to a file path
2617
- >>> app.download_asset(asset, "polygons.geojson")
2621
+ >>> app.download_asset_content(asset, "polygons.geojson")
2618
2622
  >>> # Download to an in-memory bytes buffer
2619
2623
  >>> import io
2620
2624
  >>> buffer = io.BytesIO()
2621
- >>> app.download_asset(asset, buffer)
2625
+ >>> app.download_asset_content(asset, buffer)
2622
2626
  >>> # Download and get content directly (for JSON assets)
2623
- >>> content = app.download_asset(asset)
2627
+ >>> content = app.download_asset_content(asset)
2624
2628
  >>> print(content)
2625
2629
  {'type': 'FeatureCollection', 'features': [...]}
2626
2630
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nextmv
3
- Version: 0.38.0.dev0
3
+ Version: 0.39.0.dev0
4
4
  Summary: The all-purpose Python SDK for Nextmv
5
5
  Project-URL: Homepage, https://www.nextmv.io
6
6
  Project-URL: Documentation, https://nextmv-py.docs.nextmv.io/en/latest/nextmv/
@@ -221,6 +221,7 @@ Requires-Python: >=3.10
221
221
  Requires-Dist: pydantic>=2.5.2
222
222
  Requires-Dist: pyyaml>=6.0.1
223
223
  Requires-Dist: requests>=2.31.0
224
+ Requires-Dist: typer>=0.20.1
224
225
  Requires-Dist: urllib3>=2.1.0
225
226
  Provides-Extra: all
226
227
  Requires-Dist: folium>=0.20.0; extra == 'all'
@@ -1,4 +1,4 @@
1
- nextmv/__about__.py,sha256=B3Rm3n9eSYc4eLAPE3W9zEDGU4NjLwJTxIYAUUXnZN8,29
1
+ nextmv/__about__.py,sha256=VcVUeQ5_BqdMabUFhty-34HYbF_FhFvC5nTX1ZEjXYI,29
2
2
  nextmv/__entrypoint__.py,sha256=dA0iwwHtrq6Z9w9FxmxKLoBGLyhe7jWtUAU-Y3PEgHg,1094
3
3
  nextmv/__init__.py,sha256=mC-gAzCdoZJ0BOVe2fDzKNdBtbXzx8XOxHP_7DdPMdQ,3857
4
4
  nextmv/_serialization.py,sha256=jYitMS1MU8ldsmObT-K_8V8P2Wx69tnDiEHCCgPGun4,2834
@@ -14,10 +14,13 @@ nextmv/polling.py,sha256=Mka7tChVR7Ws-Hg9W-Yzo7wthhVg-Qp-FK54E70Fzdw,9711
14
14
  nextmv/run.py,sha256=qeT3a0eqVHKvbQiFxmX_2epaj-rz2GyfpdZJ4ROFC4U,53135
15
15
  nextmv/safe.py,sha256=VAK4fGEurbLNji4Pg5Okga5XQSbI4aI9JJf95_68Z20,3867
16
16
  nextmv/status.py,sha256=SCDLhh2om3yeO5FxO0x-_RShQsZNXEpjHNdCGdb3VUI,2787
17
+ nextmv/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ nextmv/cli/main.py,sha256=WD6Zawsv-UQ_ZLHtO7nZGPJCGV5678ER4cdgG5aUcIM,326
19
+ nextmv/cli/version.py,sha256=Fu__CpNhbl-ARan28V9HVJmfO-2fZKVBE6SgvB0dSb4,225
17
20
  nextmv/cloud/__init__.py,sha256=n8laWdl0BjKmJOgGdPLHYUY_eaqhmXlW0-421A3SfwM,5336
18
21
  nextmv/cloud/acceptance_test.py,sha256=fZdp4O6pZrl7TaiUrTFPp7O4VJt-4R_W2yo4s8UAS5I,27691
19
22
  nextmv/cloud/account.py,sha256=jIdGNyI3l3dVh2PuriAwAOrEuWRM150WgzxcBMVBNRw,6058
20
- nextmv/cloud/application.py,sha256=9i6OqLYvVrYsDk0QJ6SAYVGWW743vA-ScvSnP5vZYWE,144149
23
+ nextmv/cloud/application.py,sha256=tJRi6lfzfsPemqe37p4MigpVEnvi5fSiufUmErLxKk4,144220
21
24
  nextmv/cloud/assets.py,sha256=alw634ub-DR0CHQXZy_ObeGvQthPXFLdgzgbvbH1SGY,1376
22
25
  nextmv/cloud/batch_experiment.py,sha256=VmKgjBW6BpkH4loO0afMGNXrwJ5whhijQ99pm94vBto,10349
23
26
  nextmv/cloud/client.py,sha256=Yj4FE4GKsLHkYijAYXcotlyNfhAWANMuWetHXsYPg1M,18101
@@ -45,7 +48,8 @@ nextmv/local/geojson_handler.py,sha256=7FavJdkUonop-yskjis0x3qFGB8A5wZyoBUblw-bV
45
48
  nextmv/local/local.py,sha256=cp56UpI8h19Ob6Jvb_Ni0ceXH5Vv3ET_iPTDe6ftq3Y,2617
46
49
  nextmv/local/plotly_handler.py,sha256=bLb50e3AkVr_W-F6S7lXfeRdN60mG2jk3UElNmhoMWU,1930
47
50
  nextmv/local/runner.py,sha256=Fa-G4g5yaBgLeBfYU-ePs65Q3Ses_xYvXGhPtHpAkrU,8546
48
- nextmv-0.38.0.dev0.dist-info/METADATA,sha256=j989AkAWEJkZW7y0eKU-RTOIZeH7oNcJzv1GKNwlHqE,15995
49
- nextmv-0.38.0.dev0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
50
- nextmv-0.38.0.dev0.dist-info/licenses/LICENSE,sha256=ZIbK-sSWA-OZprjNbmJAglYRtl5_K4l9UwAV3PGJAPc,11349
51
- nextmv-0.38.0.dev0.dist-info/RECORD,,
51
+ nextmv-0.39.0.dev0.dist-info/METADATA,sha256=Q6oLECxuWxNrYR62UBqE5xpwUYmN5t8uWm3FeUMviQU,16024
52
+ nextmv-0.39.0.dev0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
53
+ nextmv-0.39.0.dev0.dist-info/entry_points.txt,sha256=hDHAJq2svhL8KEGw0u9M-_MQ1XwQOIkZdVgpTtjKBsQ,47
54
+ nextmv-0.39.0.dev0.dist-info/licenses/LICENSE,sha256=ZIbK-sSWA-OZprjNbmJAglYRtl5_K4l9UwAV3PGJAPc,11349
55
+ nextmv-0.39.0.dev0.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ nextmv = nextmv.cli.main:app