nextmv 0.30.0__py3-none-any.whl → 0.32.0__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,5 +1,15 @@
1
1
  """
2
- Utilities for generating “safe” IDs and huma-readable names
2
+
3
+ The safe module contains utilities for generating “safe” IDs and human-readable
4
+ names.
5
+
6
+ Functions
7
+ ---------
8
+ safe_name_and_id
9
+ Generate a safe ID and human-readable name from a prefix and user-supplied
10
+ identifier.
11
+ safe_id
12
+ Generate a safe ID from a prefix.
3
13
  """
4
14
 
5
15
  import re
@@ -31,11 +41,17 @@ def _nanoid(size: int = 8, alphabet: str = string.ascii_lowercase + string.digit
31
41
  return "".join(secrets.choice(alphabet) for _ in range(size))
32
42
 
33
43
 
34
- def _name_and_id(prefix: str, entity_id: str) -> tuple[str, str]:
44
+ def safe_name_and_id(prefix: str, entity_id: str) -> tuple[str, str]:
35
45
  """
36
46
  Generate a safe ID and human-readable name from a prefix and user-supplied
37
47
  identifier.
38
48
 
49
+ You can import the `safe_name_and_id` function directly from `nextmv`:
50
+
51
+ ```python
52
+ from nextmv import safe_name_and_id
53
+ ```
54
+
39
55
  Parameters
40
56
  ----------
41
57
  prefix : str
@@ -48,6 +64,11 @@ def _name_and_id(prefix: str, entity_id: str) -> tuple[str, str]:
48
64
  -------
49
65
  tuple[str, str]
50
66
  A tuple containing the human-readable name and the safe ID.
67
+
68
+ Examples
69
+ --------
70
+ >>> safe_name_and_id("app", "My Application 123!")
71
+ ('App My Application 123', 'app-my-application-123-4f5g6h7j')
51
72
  """
52
73
 
53
74
  if not prefix or not entity_id:
@@ -83,10 +104,16 @@ def _name_and_id(prefix: str, entity_id: str) -> tuple[str, str]:
83
104
  return safe_name, safe_id
84
105
 
85
106
 
86
- def _safe_id(prefix: str) -> str:
107
+ def safe_id(prefix: str) -> str:
87
108
  """
88
109
  Generate a safe ID from a prefix.
89
110
 
111
+ You can import the `safe_id` function directly from `nextmv`:
112
+
113
+ ```python
114
+ from nextmv import safe_id
115
+ ```
116
+
90
117
  Parameters
91
118
  ----------
92
119
  prefix : str
@@ -96,6 +123,11 @@ def _safe_id(prefix: str) -> str:
96
123
  -------
97
124
  str
98
125
  A safe ID.
126
+
127
+ Examples
128
+ --------
129
+ >>> safe_id("app")
130
+ 'app-4f5g6h7j'
99
131
  """
100
132
 
101
133
  random_slug = _nanoid(8)
@@ -1,9 +1,9 @@
1
1
  """
2
- Provides status enums for Nextmv Cloud runs.
2
+ Provides status enums for Nextmv application runs.
3
3
 
4
- This module defines enumerations for representing the status of a run in
5
- Nextmv Cloud. It includes a deprecated `Status` enum and the current `StatusV2`
6
- enum.
4
+ This module defines enumerations for representing the status of a run in a
5
+ Nextmv application. It includes a deprecated `Status` enum and the current
6
+ `StatusV2` enum.
7
7
 
8
8
  Classes
9
9
  -------
@@ -23,10 +23,10 @@ class Status(str, Enum):
23
23
 
24
24
  Status of a run.
25
25
 
26
- You can import the `Status` class directly from `cloud`:
26
+ You can import the `Status` class directly from `nextmv`:
27
27
 
28
28
  ```python
29
- from nextmv.cloud import Status
29
+ from nextmv import Status
30
30
  ```
31
31
 
32
32
  This enum represents the possible states of a run. It is deprecated and
@@ -67,14 +67,14 @@ class StatusV2(str, Enum):
67
67
  """
68
68
  Status of a run.
69
69
 
70
- You can import the `StatusV2` class directly from `cloud`:
70
+ You can import the `StatusV2` class directly from `nextmv`:
71
71
 
72
72
  ```python
73
- from nextmv.cloud import StatusV2
73
+ from nextmv import StatusV2
74
74
  ```
75
75
 
76
76
  This enum represents the comprehensive set of possible states for a run
77
- in Nextmv Cloud.
77
+ in Nextmv.
78
78
 
79
79
  Attributes
80
80
  ----------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nextmv
3
- Version: 0.30.0
3
+ Version: 0.32.0
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/
@@ -224,13 +224,17 @@ Requires-Dist: pyyaml>=6.0.1
224
224
  Requires-Dist: requests>=2.31.0
225
225
  Requires-Dist: urllib3>=2.1.0
226
226
  Provides-Extra: all
227
+ Requires-Dist: folium>=0.20.0; extra == 'all'
227
228
  Requires-Dist: mlflow>=2.17.2; extra == 'all'
229
+ Requires-Dist: plotly>=6.0.1; extra == 'all'
228
230
  Provides-Extra: dev
229
231
  Requires-Dist: build>=1.0.3; extra == 'dev'
232
+ Requires-Dist: folium>=0.20.0; extra == 'dev'
230
233
  Requires-Dist: mlflow>=2.19.0; extra == 'dev'
231
234
  Requires-Dist: nextroute>=1.11.1; extra == 'dev'
232
235
  Requires-Dist: openpyxl>=3.1.5; extra == 'dev'
233
236
  Requires-Dist: pandas>=2.2.3; extra == 'dev'
237
+ Requires-Dist: plotly>=6.0.1; extra == 'dev'
234
238
  Requires-Dist: pydantic>=2.5.2; extra == 'dev'
235
239
  Requires-Dist: pyyaml>=6.0.1; extra == 'dev'
236
240
  Requires-Dist: requests>=2.31.0; extra == 'dev'
@@ -0,0 +1,49 @@
1
+ nextmv/__about__.py,sha256=8eaqWsF6AYp-9Iqzy05LB4Lu1iuUyTkZ5v8LPco9uLM,24
2
+ nextmv/__entrypoint__.py,sha256=dA0iwwHtrq6Z9w9FxmxKLoBGLyhe7jWtUAU-Y3PEgHg,1094
3
+ nextmv/__init__.py,sha256=pW2HMcJnNSFqF_tj77TtqpddEeCosTKS7NxGNPDp7mU,3620
4
+ nextmv/_serialization.py,sha256=JlSl6BL0M2Esf7F89GsGIZ__Pp8RnFRNM0UxYhuuYU4,2853
5
+ nextmv/base_model.py,sha256=qmJ4AsYr9Yv01HQX_BERrn3229gyoZrYyP9tcyqNfeU,2311
6
+ nextmv/deprecated.py,sha256=kEVfyQ-nT0v2ePXTNldjQG9uH5IlfQVy3L4tztIxwmU,1638
7
+ nextmv/input.py,sha256=m9sVfO9ZL3F5i1l8amEtlWlbkekyUP4C3y9DduHWGFs,40211
8
+ nextmv/logger.py,sha256=kNIbu46MisrzYe4T0hNMpWfRTKKacDVvbtQcNys_c_E,2513
9
+ nextmv/manifest.py,sha256=wzGDrGleIgYvRvKyy73acjd68cGdCLD_7x_Dy3UhCaI,44266
10
+ nextmv/model.py,sha256=vI3pSV3iTwjRPflar7nAg-6h98XRUyi9II5O2J06-Kc,15018
11
+ nextmv/options.py,sha256=yPJu5lYMbV6YioMwAXv7ctpZUggLXKlZc9CqIbUFvE4,37895
12
+ nextmv/output.py,sha256=HdvWYG3gIzwoXquulaEVI4LLchXJDjkbag0BkBPM0vQ,55128
13
+ nextmv/polling.py,sha256=nfefvWI1smm-lIzaXE-4DMlojp6KXIvVi88XLJYUmo8,9724
14
+ nextmv/run.py,sha256=lAWWkLml1C7wkXSvN8orBjudoz72Qv5ZCHCWY9e7xaY,45813
15
+ nextmv/safe.py,sha256=VAK4fGEurbLNji4Pg5Okga5XQSbI4aI9JJf95_68Z20,3867
16
+ nextmv/status.py,sha256=SCDLhh2om3yeO5FxO0x-_RShQsZNXEpjHNdCGdb3VUI,2787
17
+ nextmv/cloud/__init__.py,sha256=5B2aMKffI_WSFlVlT-oO7ISMqxJeN9XEoqmy7ghKmOI,4651
18
+ nextmv/cloud/acceptance_test.py,sha256=1IQ2w7Imu_NAKknLQYNIIV9i_XIf8tmNHVTAOBEtsU8,25675
19
+ nextmv/cloud/account.py,sha256=jIdGNyI3l3dVh2PuriAwAOrEuWRM150WgzxcBMVBNRw,6058
20
+ nextmv/cloud/application.py,sha256=xUipgYYzqZpda0242d96zft78ZJsbz7KG361hiTBJvQ,134954
21
+ nextmv/cloud/batch_experiment.py,sha256=13ciRpgBabMMTyazfdfEAymD3rTPrTAAorECsANxxuA,10397
22
+ nextmv/cloud/client.py,sha256=E0DiUb377jvEnpXlRnfT1PGCI0Jm0lTUoX5VqeU91lk,18165
23
+ nextmv/cloud/input_set.py,sha256=NkzA6_hwgD-YwoirzwvZrObIoBTfurry7Os3jo4DyXc,4236
24
+ nextmv/cloud/instance.py,sha256=SS4tbp0LQMWDaeYpwcNxJei82oi_Hozv1t5i3QGjASY,4024
25
+ nextmv/cloud/package.py,sha256=cG75DptN4sxXaT8ruDh2EY2duaK5Jwg16X2LV0BP8ts,13021
26
+ nextmv/cloud/scenario.py,sha256=JRFTDiFBcrgud6wE2qDHUu5oO-Ur3zbPYhhB6ONCxTo,14263
27
+ nextmv/cloud/secrets.py,sha256=fA5cX0jfTsPVZWV7433wzETGlXpWRLHGswuObx9e6FQ,6820
28
+ nextmv/cloud/url.py,sha256=Fz70ywkWdCLmP21ZBmJwZi5kDbjpmsX_VlwVF_xQeHg,1836
29
+ nextmv/cloud/version.py,sha256=5_S7_pWUVBFbvAArku20eK7S645GJcHtgE2OpXLdSzQ,5300
30
+ nextmv/default_app/.gitignore,sha256=gsfnfXMYNt-YTroh5hAzauwBZoPDJ6D_fB17rMSnIko,8
31
+ nextmv/default_app/README.md,sha256=SroGwvWiDTz12yctMfviFYw7z1EMU_72ESK2dyt-Ypg,664
32
+ nextmv/default_app/app.yaml,sha256=TKjKnuoK0SDpouB_AS7TQmE_8HZbQYjmwFvhzFL1xpc,382
33
+ nextmv/default_app/input.json,sha256=zgvbKL3boB0WIU6-9mEU3ZWBddQ5cQ0vhgmDwDyz4hE,63
34
+ nextmv/default_app/main.py,sha256=gG-1JIvKXPCkm4JV46PcXxsQTAefwPXQbdPxkSubhf0,888
35
+ nextmv/default_app/requirements.txt,sha256=wRE_HkYYWzCGnYZ2NuatHXul4gCHvU3iUAdsxtzpYiA,29
36
+ nextmv/default_app/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
+ nextmv/default_app/src/main.py,sha256=WWeN_xl_mcPhICl3rSCvdEjRkFXGmAnej88FhS-fAmc,884
38
+ nextmv/default_app/src/visuals.py,sha256=WYK_YBnLmYo3TpVev1CpoNCuW5R7hk9QIkeCmvMn1Fs,1014
39
+ nextmv/local/__init__.py,sha256=6BsoqlK4dw6X11_uKzz9gBPfxKpdiol2FYO8R3X73SE,116
40
+ nextmv/local/application.py,sha256=qq14ihKxymg5NHqhU56qTu6lVmMYWLGYUJC4MrhWB68,45815
41
+ nextmv/local/executor.py,sha256=PFeEZaGhEq9mCaeJbrFBStDpsTWv3j6Z89_SjbnphiE,24321
42
+ nextmv/local/geojson_handler.py,sha256=7FavJdkUonop-yskjis0x3qFGB8A5wZyoBUblw-bVhw,12540
43
+ nextmv/local/local.py,sha256=wUHuoAXqJIZpTJBh056hmQuiPEjlZvLTR2BC6Ino-WI,2619
44
+ nextmv/local/plotly_handler.py,sha256=bLb50e3AkVr_W-F6S7lXfeRdN60mG2jk3UElNmhoMWU,1930
45
+ nextmv/local/runner.py,sha256=hwkITHrQG_J9TzxufnaP1mjLWG-iSsNQD66UFZY4pp4,8602
46
+ nextmv-0.32.0.dist-info/METADATA,sha256=1GjISld5ZhyMzugNVUIH8ecX9sLHJU_p3e8qfao2A84,16008
47
+ nextmv-0.32.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
48
+ nextmv-0.32.0.dist-info/licenses/LICENSE,sha256=ZIbK-sSWA-OZprjNbmJAglYRtl5_K4l9UwAV3PGJAPc,11349
49
+ nextmv-0.32.0.dist-info/RECORD,,