nextmv 0.26.1__py3-none-any.whl → 0.26.2.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.26.1"
1
+ __version__ = "v0.26.2.dev0"
nextmv/output.py CHANGED
@@ -292,6 +292,10 @@ class Output:
292
292
  """Optional configuration for writing CSV files, to be used when the
293
293
  `output_format` is OutputFormat.CSV_ARCHIVE. These configurations are
294
294
  passed as kwargs to the `DictWriter` class from the `csv` module."""
295
+ json_configurations: Optional[dict[str, Any]] = None
296
+ """Optional configuration for writing JSON files, to be used when the
297
+ `output_format` is OutputFormat.JSON. These configurations are passed as
298
+ kwargs to the `json.dumps` function."""
295
299
  assets: Optional[list[Asset]] = None
296
300
  """Optional list of assets to be included in the output."""
297
301
 
@@ -342,6 +346,8 @@ class Output:
342
346
 
343
347
  if self.output_format == OutputFormat.CSV_ARCHIVE:
344
348
  output_dict["csv_configurations"] = self.csv_configurations
349
+ elif self.output_format == OutputFormat.JSON:
350
+ output_dict["json_configurations"] = self.json_configurations
345
351
 
346
352
  return output_dict
347
353
 
@@ -383,10 +389,23 @@ class LocalOutputWriter(OutputWriter):
383
389
  "assets": assets,
384
390
  }
385
391
 
392
+ json_configurations = {}
393
+ if hasattr(output, "json_configurations") and output.json_configurations is not None:
394
+ json_configurations = output.json_configurations
395
+
396
+ indent, custom_serial = 2, _custom_serial
397
+ if "indent" in json_configurations:
398
+ indent = json_configurations["indent"]
399
+ del json_configurations["indent"]
400
+ if "default" in json_configurations:
401
+ custom_serial = json_configurations["default"]
402
+ del json_configurations["default"]
403
+
386
404
  serialized = json.dumps(
387
405
  final_output,
388
- indent=2,
389
- default=_custom_serial,
406
+ indent=indent,
407
+ default=custom_serial,
408
+ **json_configurations,
390
409
  )
391
410
 
392
411
  if path is None or path == "":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nextmv
3
- Version: 0.26.1
3
+ Version: 0.26.2.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://www.nextmv.io/docs/python-sdks/nextmv/installation
@@ -1,4 +1,4 @@
1
- nextmv/__about__.py,sha256=MxqQiLafrvDHqguGRsR2SDY95UETqLzJGiFRY6QwEmk,24
1
+ nextmv/__about__.py,sha256=lnRsG2-bwZrmXrOZ8QGmXRZE-VFPAlCZfCF6UgS_SE0,29
2
2
  nextmv/__entrypoint__.py,sha256=5K058PICm5sx4sNMqx56auMh9yWgdIESVLzfvyIXdjs,1158
3
3
  nextmv/__init__.py,sha256=QN5e_BFkIdBkR8DiGr9T06N6mXtowT84eRUJj3_Vfrg,1459
4
4
  nextmv/base_model.py,sha256=mdaBe-epNK1cFgP4TxbOtn3So4pCi1vMTOrIBkCBp7A,1050
@@ -7,7 +7,7 @@ nextmv/input.py,sha256=tppXHiJM_EzR9Z1yJPc37joBvgC0RmiAFo0Ab1X5nPA,15480
7
7
  nextmv/logger.py,sha256=Jo_AmYJ02WqXmsz9XTTOXZ9uenVHrPanMMqhBogxGCw,1075
8
8
  nextmv/model.py,sha256=rwBdgmKSEp1DPv43zF0azj3QnbHO6O6wKs0PIGvVS40,9861
9
9
  nextmv/options.py,sha256=IPqAIUjoKMWmoPx_e5zDcnxu7S2HVxw-SLjjUduVvZM,25302
10
- nextmv/output.py,sha256=rcmDivGRsInyS944ivO6SBtVFSH3RC5Nwu0qFTFRRLI,22270
10
+ nextmv/output.py,sha256=nOdPJ7yBcEteUsSD6BXYwXcyV4ROKbATQXHh43Sl-6s,23221
11
11
  nextmv/cloud/__init__.py,sha256=EEKJdSMMjW2yc9GwTpz-cmpgtu-Qs7p09k6NXIQPV0U,3726
12
12
  nextmv/cloud/acceptance_test.py,sha256=NtqGhj-UYibxGBbU2kfjr-lYcngojb_5VMvK2WZwibI,6620
13
13
  nextmv/cloud/account.py,sha256=mZUGzV-uMGBA5BC_FPtsiCMFuz5jxEZ3O1BbELZIm18,1841
@@ -24,7 +24,7 @@ nextmv/cloud/scenario.py,sha256=9gbdnQuvmerPUBCcJ-5QbLCwgbsIfBwKXE8c5359S8E,8120
24
24
  nextmv/cloud/secrets.py,sha256=kqlN4ceww_L4kVTrAU8BZykRzXINO3zhMT_BLYea6tk,1764
25
25
  nextmv/cloud/status.py,sha256=C-ax8cLw0jPeh7CPsJkCa0s4ImRyFI4NDJJxI0_1sr4,602
26
26
  nextmv/cloud/version.py,sha256=sjVRNRtohHA97j6IuyM33_DSSsXYkZPusYgpb6hlcrc,1244
27
- nextmv-0.26.1.dist-info/METADATA,sha256=fHq_8Cren23n3msctySfLJMtnOl4kpC2iEmSE6Ug2t0,14557
28
- nextmv-0.26.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
29
- nextmv-0.26.1.dist-info/licenses/LICENSE,sha256=ZIbK-sSWA-OZprjNbmJAglYRtl5_K4l9UwAV3PGJAPc,11349
30
- nextmv-0.26.1.dist-info/RECORD,,
27
+ nextmv-0.26.2.dev0.dist-info/METADATA,sha256=7P11SaSDMcX8N6z0gO4LOob76Rdew2nxN3l_xcLQdUE,14562
28
+ nextmv-0.26.2.dev0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
29
+ nextmv-0.26.2.dev0.dist-info/licenses/LICENSE,sha256=ZIbK-sSWA-OZprjNbmJAglYRtl5_K4l9UwAV3PGJAPc,11349
30
+ nextmv-0.26.2.dev0.dist-info/RECORD,,