nextmv 0.29.5.dev1__py3-none-any.whl → 0.31.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.29.5.dev1
3
+ Version: 0.31.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,46 @@
1
+ nextmv/__about__.py,sha256=i5eBaiSsNePRIiANLGw8JNVRypZK2clr6sonwFiA8Bk,24
2
+ nextmv/__entrypoint__.py,sha256=dA0iwwHtrq6Z9w9FxmxKLoBGLyhe7jWtUAU-Y3PEgHg,1094
3
+ nextmv/__init__.py,sha256=tKJua9rvXDBMSN_PfpL3uuv2bISb_e5-ROWZRmnWnzk,3885
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=EMwfTt8vsw-yBI6dNnTJpK2c6jhI6OefATY0t69P7FI,40384
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=d1CSaeVWTR6go1kKmx4VHgIPhK7McI9-aFxoga-Rjvg,55625
13
+ nextmv/polling.py,sha256=nfefvWI1smm-lIzaXE-4DMlojp6KXIvVi88XLJYUmo8,9724
14
+ nextmv/run.py,sha256=rjHP7RzNkEKMucti3rCY9vi2UOVEEHSz0d_OqTYFRHY,34257
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=Vx8EZvuXfKQK9GztGXEMicA4OP0cxn_jWTOvOx0k4hE,134099
21
+ nextmv/cloud/batch_experiment.py,sha256=UQBPX9YwPlaNh8wnI-HTj5VVwK164bfPTElTRy3fdng,10182
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=zY9iXhqQM4Kan9XnTHoQrBMArXfD6d-k1z-MBle8yxs,451
32
+ nextmv/default_app/app.yaml,sha256=DnUN78PxzVsyppSwGQhr8iJLKqdMiCcjIzzTZhzz9S8,395
33
+ nextmv/default_app/requirements.txt,sha256=wRE_HkYYWzCGnYZ2NuatHXul4gCHvU3iUAdsxtzpYiA,29
34
+ nextmv/default_app/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
+ nextmv/default_app/src/main.py,sha256=WWeN_xl_mcPhICl3rSCvdEjRkFXGmAnej88FhS-fAmc,884
36
+ nextmv/default_app/src/visuals.py,sha256=WYK_YBnLmYo3TpVev1CpoNCuW5R7hk9QIkeCmvMn1Fs,1014
37
+ nextmv/local/__init__.py,sha256=6BsoqlK4dw6X11_uKzz9gBPfxKpdiol2FYO8R3X73SE,116
38
+ nextmv/local/application.py,sha256=n3nu4T_vwJiMUeCqmeFpe-925fd5208vDk46QffOjCI,45194
39
+ nextmv/local/executor.py,sha256=NaNC70Cgv42Mpcbr6woAf4fcGpgxE3FnYvDAAdhntUI,24329
40
+ nextmv/local/geojson_handler.py,sha256=7FavJdkUonop-yskjis0x3qFGB8A5wZyoBUblw-bVhw,12540
41
+ nextmv/local/plotly_handler.py,sha256=bLb50e3AkVr_W-F6S7lXfeRdN60mG2jk3UElNmhoMWU,1930
42
+ nextmv/local/runner.py,sha256=SH1XR0JpxdMiFfUiYZ3io_I65N4uTgOAtEAQ1mwQFP8,9753
43
+ nextmv-0.31.0.dist-info/METADATA,sha256=RMGw8a13Zbt93dzblapt8q1Mw7zPoFBN1d3NkpNrGB4,16008
44
+ nextmv-0.31.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
45
+ nextmv-0.31.0.dist-info/licenses/LICENSE,sha256=ZIbK-sSWA-OZprjNbmJAglYRtl5_K4l9UwAV3PGJAPc,11349
46
+ nextmv-0.31.0.dist-info/RECORD,,
@@ -1,37 +0,0 @@
1
- nextmv/__about__.py,sha256=1SVbu68wEsLoHV7PnoKLzsYP7hPdn2-2Yx0-mN6ohaI,30
2
- nextmv/__entrypoint__.py,sha256=dA0iwwHtrq6Z9w9FxmxKLoBGLyhe7jWtUAU-Y3PEgHg,1094
3
- nextmv/__init__.py,sha256=FsF0pEkOSBuPY5EKu7NsBxro7jswGmOmaw61kZEudXY,1930
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=iTMIdhSi4H-Xot44CYaUH110WDcpWDsJ5JXxSMGIZaY,40030
8
- nextmv/logger.py,sha256=kNIbu46MisrzYe4T0hNMpWfRTKKacDVvbtQcNys_c_E,2513
9
- nextmv/model.py,sha256=vI3pSV3iTwjRPflar7nAg-6h98XRUyi9II5O2J06-Kc,15018
10
- nextmv/options.py,sha256=yPJu5lYMbV6YioMwAXv7ctpZUggLXKlZc9CqIbUFvE4,37895
11
- nextmv/output.py,sha256=vcBqtP1hJLYyUvfk_vl1Ejbk3q5KxOmlTz4Lnqqnyd0,54141
12
- nextmv/cloud/__init__.py,sha256=cGRkIcn1evTdgw7lEH2k4MPTZnq37XIF3ovbuDjUWGI,3914
13
- nextmv/cloud/acceptance_test.py,sha256=Bcfdmh2fkPeBx8FDCngeUo2fjV_LhsUdygnzDQCDbYY,26898
14
- nextmv/cloud/account.py,sha256=eukiYQha4U2fkIjg4SgdoawKE1kU5G7GPyDJVrn8hHA,6064
15
- nextmv/cloud/application.py,sha256=oyeXLUemFGRU3cPu0B3_WTtpzvAch5vR3Mo4gswohKs,130627
16
- nextmv/cloud/batch_experiment.py,sha256=Rmcwe1uAVz2kRrAMQqLYC5d__L_IqPXbF__RE3uQTAY,8196
17
- nextmv/cloud/client.py,sha256=E0DiUb377jvEnpXlRnfT1PGCI0Jm0lTUoX5VqeU91lk,18165
18
- nextmv/cloud/input_set.py,sha256=2dqmf5z-rZjTKwtBRvnUdfPfKv28It5uTCX0C70uP4Y,4242
19
- nextmv/cloud/instance.py,sha256=SS4tbp0LQMWDaeYpwcNxJei82oi_Hozv1t5i3QGjASY,4024
20
- nextmv/cloud/manifest.py,sha256=5FqXtT1q7qmyQxqB5rG33y97WFZ6erL1f9kRel575RQ,37456
21
- nextmv/cloud/package.py,sha256=f0OjdlIOsI2LpmgSxdFf6YaA8Ucs9yAm_3bO0Cp8LH4,13027
22
- nextmv/cloud/run.py,sha256=-I1S5fLIFLH1P9xViv5bOS2LbO9-w6tnB8cBGU0_yTo,22743
23
- nextmv/cloud/safe.py,sha256=hWh_quD2KSazTV5SOAddOsFLsY4oWBzajOUcCeHOjc8,3180
24
- nextmv/cloud/scenario.py,sha256=JRFTDiFBcrgud6wE2qDHUu5oO-Ur3zbPYhhB6ONCxTo,14263
25
- nextmv/cloud/secrets.py,sha256=fA5cX0jfTsPVZWV7433wzETGlXpWRLHGswuObx9e6FQ,6820
26
- nextmv/cloud/status.py,sha256=blvykRCTCTBkaqH88j4dzdQLhU2v1Ig62-_va98zw20,2789
27
- nextmv/cloud/version.py,sha256=5_S7_pWUVBFbvAArku20eK7S645GJcHtgE2OpXLdSzQ,5300
28
- nextmv/default_app/README.md,sha256=zY9iXhqQM4Kan9XnTHoQrBMArXfD6d-k1z-MBle8yxs,451
29
- nextmv/default_app/app.yaml,sha256=USfr6K4YkIC9VEw-ExlNIZKxkZf6beBu1YW6pWIzF2o,370
30
- nextmv/default_app/requirements.txt,sha256=wRE_HkYYWzCGnYZ2NuatHXul4gCHvU3iUAdsxtzpYiA,29
31
- nextmv/default_app/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
- nextmv/default_app/src/main.py,sha256=HlO8UwZbZYiAQyrZDSR_T4NBcwP1gIjdTdwkJP_dn8I,847
33
- nextmv/default_app/src/visuals.py,sha256=WYK_YBnLmYo3TpVev1CpoNCuW5R7hk9QIkeCmvMn1Fs,1014
34
- nextmv-0.29.5.dev1.dist-info/METADATA,sha256=ZjPhAMSjNH140opVHGm7ifWCR6hND8LGfYm1xH5bhCU,15831
35
- nextmv-0.29.5.dev1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
36
- nextmv-0.29.5.dev1.dist-info/licenses/LICENSE,sha256=ZIbK-sSWA-OZprjNbmJAglYRtl5_K4l9UwAV3PGJAPc,11349
37
- nextmv-0.29.5.dev1.dist-info/RECORD,,