nextmv 0.18.0__py3-none-any.whl → 1.0.0.dev2__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.
Files changed (175) hide show
  1. nextmv/__about__.py +1 -1
  2. nextmv/__entrypoint__.py +8 -13
  3. nextmv/__init__.py +53 -0
  4. nextmv/_serialization.py +96 -0
  5. nextmv/base_model.py +54 -9
  6. nextmv/cli/CONTRIBUTING.md +511 -0
  7. nextmv/cli/__init__.py +0 -0
  8. nextmv/cli/cloud/__init__.py +47 -0
  9. nextmv/cli/cloud/acceptance/__init__.py +27 -0
  10. nextmv/cli/cloud/acceptance/create.py +393 -0
  11. nextmv/cli/cloud/acceptance/delete.py +68 -0
  12. nextmv/cli/cloud/acceptance/get.py +104 -0
  13. nextmv/cli/cloud/acceptance/list.py +62 -0
  14. nextmv/cli/cloud/acceptance/update.py +95 -0
  15. nextmv/cli/cloud/account/__init__.py +28 -0
  16. nextmv/cli/cloud/account/create.py +83 -0
  17. nextmv/cli/cloud/account/delete.py +60 -0
  18. nextmv/cli/cloud/account/get.py +66 -0
  19. nextmv/cli/cloud/account/update.py +70 -0
  20. nextmv/cli/cloud/app/__init__.py +35 -0
  21. nextmv/cli/cloud/app/create.py +141 -0
  22. nextmv/cli/cloud/app/delete.py +58 -0
  23. nextmv/cli/cloud/app/exists.py +44 -0
  24. nextmv/cli/cloud/app/get.py +66 -0
  25. nextmv/cli/cloud/app/list.py +61 -0
  26. nextmv/cli/cloud/app/push.py +137 -0
  27. nextmv/cli/cloud/app/update.py +124 -0
  28. nextmv/cli/cloud/batch/__init__.py +29 -0
  29. nextmv/cli/cloud/batch/create.py +454 -0
  30. nextmv/cli/cloud/batch/delete.py +68 -0
  31. nextmv/cli/cloud/batch/get.py +104 -0
  32. nextmv/cli/cloud/batch/list.py +63 -0
  33. nextmv/cli/cloud/batch/metadata.py +66 -0
  34. nextmv/cli/cloud/batch/update.py +95 -0
  35. nextmv/cli/cloud/data/__init__.py +26 -0
  36. nextmv/cli/cloud/data/upload.py +162 -0
  37. nextmv/cli/cloud/ensemble/__init__.py +31 -0
  38. nextmv/cli/cloud/ensemble/create.py +414 -0
  39. nextmv/cli/cloud/ensemble/delete.py +67 -0
  40. nextmv/cli/cloud/ensemble/get.py +65 -0
  41. nextmv/cli/cloud/ensemble/update.py +103 -0
  42. nextmv/cli/cloud/input_set/__init__.py +30 -0
  43. nextmv/cli/cloud/input_set/create.py +170 -0
  44. nextmv/cli/cloud/input_set/get.py +63 -0
  45. nextmv/cli/cloud/input_set/list.py +63 -0
  46. nextmv/cli/cloud/input_set/update.py +123 -0
  47. nextmv/cli/cloud/instance/__init__.py +35 -0
  48. nextmv/cli/cloud/instance/create.py +290 -0
  49. nextmv/cli/cloud/instance/delete.py +62 -0
  50. nextmv/cli/cloud/instance/exists.py +39 -0
  51. nextmv/cli/cloud/instance/get.py +62 -0
  52. nextmv/cli/cloud/instance/list.py +60 -0
  53. nextmv/cli/cloud/instance/update.py +216 -0
  54. nextmv/cli/cloud/managed_input/__init__.py +31 -0
  55. nextmv/cli/cloud/managed_input/create.py +146 -0
  56. nextmv/cli/cloud/managed_input/delete.py +65 -0
  57. nextmv/cli/cloud/managed_input/get.py +63 -0
  58. nextmv/cli/cloud/managed_input/list.py +60 -0
  59. nextmv/cli/cloud/managed_input/update.py +97 -0
  60. nextmv/cli/cloud/run/__init__.py +37 -0
  61. nextmv/cli/cloud/run/cancel.py +37 -0
  62. nextmv/cli/cloud/run/create.py +530 -0
  63. nextmv/cli/cloud/run/get.py +199 -0
  64. nextmv/cli/cloud/run/input.py +86 -0
  65. nextmv/cli/cloud/run/list.py +80 -0
  66. nextmv/cli/cloud/run/logs.py +167 -0
  67. nextmv/cli/cloud/run/metadata.py +67 -0
  68. nextmv/cli/cloud/run/track.py +501 -0
  69. nextmv/cli/cloud/scenario/__init__.py +29 -0
  70. nextmv/cli/cloud/scenario/create.py +451 -0
  71. nextmv/cli/cloud/scenario/delete.py +65 -0
  72. nextmv/cli/cloud/scenario/get.py +102 -0
  73. nextmv/cli/cloud/scenario/list.py +63 -0
  74. nextmv/cli/cloud/scenario/metadata.py +67 -0
  75. nextmv/cli/cloud/scenario/update.py +93 -0
  76. nextmv/cli/cloud/secrets/__init__.py +33 -0
  77. nextmv/cli/cloud/secrets/create.py +206 -0
  78. nextmv/cli/cloud/secrets/delete.py +67 -0
  79. nextmv/cli/cloud/secrets/get.py +66 -0
  80. nextmv/cli/cloud/secrets/list.py +60 -0
  81. nextmv/cli/cloud/secrets/update.py +147 -0
  82. nextmv/cli/cloud/shadow/__init__.py +33 -0
  83. nextmv/cli/cloud/shadow/create.py +184 -0
  84. nextmv/cli/cloud/shadow/delete.py +68 -0
  85. nextmv/cli/cloud/shadow/get.py +61 -0
  86. nextmv/cli/cloud/shadow/list.py +63 -0
  87. nextmv/cli/cloud/shadow/metadata.py +66 -0
  88. nextmv/cli/cloud/shadow/start.py +43 -0
  89. nextmv/cli/cloud/shadow/stop.py +43 -0
  90. nextmv/cli/cloud/shadow/update.py +95 -0
  91. nextmv/cli/cloud/upload/__init__.py +22 -0
  92. nextmv/cli/cloud/upload/create.py +39 -0
  93. nextmv/cli/cloud/version/__init__.py +33 -0
  94. nextmv/cli/cloud/version/create.py +97 -0
  95. nextmv/cli/cloud/version/delete.py +62 -0
  96. nextmv/cli/cloud/version/exists.py +39 -0
  97. nextmv/cli/cloud/version/get.py +62 -0
  98. nextmv/cli/cloud/version/list.py +60 -0
  99. nextmv/cli/cloud/version/update.py +92 -0
  100. nextmv/cli/community/__init__.py +24 -0
  101. nextmv/cli/community/clone.py +270 -0
  102. nextmv/cli/community/list.py +265 -0
  103. nextmv/cli/configuration/__init__.py +23 -0
  104. nextmv/cli/configuration/config.py +195 -0
  105. nextmv/cli/configuration/create.py +94 -0
  106. nextmv/cli/configuration/delete.py +67 -0
  107. nextmv/cli/configuration/list.py +77 -0
  108. nextmv/cli/main.py +188 -0
  109. nextmv/cli/message.py +153 -0
  110. nextmv/cli/options.py +206 -0
  111. nextmv/cli/version.py +38 -0
  112. nextmv/cloud/__init__.py +71 -17
  113. nextmv/cloud/acceptance_test.py +757 -51
  114. nextmv/cloud/account.py +406 -17
  115. nextmv/cloud/application/__init__.py +957 -0
  116. nextmv/cloud/application/_acceptance.py +419 -0
  117. nextmv/cloud/application/_batch_scenario.py +860 -0
  118. nextmv/cloud/application/_ensemble.py +251 -0
  119. nextmv/cloud/application/_input_set.py +227 -0
  120. nextmv/cloud/application/_instance.py +289 -0
  121. nextmv/cloud/application/_managed_input.py +227 -0
  122. nextmv/cloud/application/_run.py +1393 -0
  123. nextmv/cloud/application/_secrets.py +294 -0
  124. nextmv/cloud/application/_shadow.py +314 -0
  125. nextmv/cloud/application/_utils.py +54 -0
  126. nextmv/cloud/application/_version.py +303 -0
  127. nextmv/cloud/assets.py +48 -0
  128. nextmv/cloud/batch_experiment.py +294 -33
  129. nextmv/cloud/client.py +307 -66
  130. nextmv/cloud/ensemble.py +247 -0
  131. nextmv/cloud/input_set.py +120 -2
  132. nextmv/cloud/instance.py +133 -8
  133. nextmv/cloud/integration.py +533 -0
  134. nextmv/cloud/package.py +168 -53
  135. nextmv/cloud/scenario.py +410 -0
  136. nextmv/cloud/secrets.py +234 -0
  137. nextmv/cloud/shadow.py +190 -0
  138. nextmv/cloud/url.py +73 -0
  139. nextmv/cloud/version.py +132 -4
  140. nextmv/default_app/.gitignore +1 -0
  141. nextmv/default_app/README.md +32 -0
  142. nextmv/default_app/app.yaml +12 -0
  143. nextmv/default_app/input.json +5 -0
  144. nextmv/default_app/main.py +37 -0
  145. nextmv/default_app/requirements.txt +2 -0
  146. nextmv/default_app/src/__init__.py +0 -0
  147. nextmv/default_app/src/visuals.py +36 -0
  148. nextmv/deprecated.py +47 -0
  149. nextmv/input.py +861 -90
  150. nextmv/local/__init__.py +5 -0
  151. nextmv/local/application.py +1251 -0
  152. nextmv/local/executor.py +1042 -0
  153. nextmv/local/geojson_handler.py +323 -0
  154. nextmv/local/local.py +97 -0
  155. nextmv/local/plotly_handler.py +61 -0
  156. nextmv/local/runner.py +274 -0
  157. nextmv/logger.py +80 -9
  158. nextmv/manifest.py +1466 -0
  159. nextmv/model.py +241 -66
  160. nextmv/options.py +708 -115
  161. nextmv/output.py +1301 -274
  162. nextmv/polling.py +325 -0
  163. nextmv/run.py +1702 -0
  164. nextmv/safe.py +145 -0
  165. nextmv/status.py +122 -0
  166. nextmv-1.0.0.dev2.dist-info/METADATA +311 -0
  167. nextmv-1.0.0.dev2.dist-info/RECORD +170 -0
  168. {nextmv-0.18.0.dist-info → nextmv-1.0.0.dev2.dist-info}/WHEEL +1 -1
  169. nextmv-1.0.0.dev2.dist-info/entry_points.txt +2 -0
  170. nextmv/cloud/application.py +0 -1405
  171. nextmv/cloud/manifest.py +0 -234
  172. nextmv/cloud/status.py +0 -29
  173. nextmv-0.18.0.dist-info/METADATA +0 -770
  174. nextmv-0.18.0.dist-info/RECORD +0 -25
  175. {nextmv-0.18.0.dist-info → nextmv-1.0.0.dev2.dist-info}/licenses/LICENSE +0 -0
nextmv/safe.py ADDED
@@ -0,0 +1,145 @@
1
+ """
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.
13
+ """
14
+
15
+ import re
16
+ import secrets
17
+ import string
18
+
19
+ ENTITY_ID_CHAR_COUNT_MAX: int = 40
20
+ INDEX_TAG_CHAR_COUNT: int = 3 # room reserved for “-001”, “-xyz”, etc.
21
+ RE_NON_ALNUM = re.compile(r"[^A-Za-z0-9]+")
22
+
23
+
24
+ def _kebab_case(value: str) -> str:
25
+ """Convert arbitrary text to `kebab-case` (lower-case, hyphen-separated)."""
26
+
27
+ cleaned = RE_NON_ALNUM.sub(" ", value).strip()
28
+ return "-".join(word.lower() for word in cleaned.split())
29
+
30
+
31
+ def _start_case(value: str) -> str:
32
+ """Convert `kebab-case` (or any hyphen/underscore string) to `Start Case`."""
33
+
34
+ cleaned = re.sub(r"[-_]+", " ", value)
35
+ return " ".join(word.capitalize() for word in cleaned.split())
36
+
37
+
38
+ def _nanoid(size: int = 8, alphabet: str = string.ascii_lowercase + string.digits) -> str:
39
+ """Simple nanoid clone using the std-lib `secrets` module."""
40
+
41
+ return "".join(secrets.choice(alphabet) for _ in range(size))
42
+
43
+
44
+ def safe_name_and_id(prefix: str, entity_id: str) -> tuple[str, str]:
45
+ """
46
+ Generate a safe ID and human-readable name from a prefix and user-supplied
47
+ identifier.
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
+
55
+ Parameters
56
+ ----------
57
+ prefix : str
58
+ Prefix to use for the ID.
59
+ entity_id : str
60
+ User-supplied identifier. This will be converted to `kebab-case` and
61
+ truncated to fit within the safe ID length.
62
+
63
+ Returns
64
+ -------
65
+ tuple[str, str]
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')
72
+ """
73
+
74
+ if not prefix or not entity_id:
75
+ return "", ""
76
+
77
+ safe_user_defined_id = _kebab_case(entity_id)
78
+ random_slug = _nanoid(8)
79
+
80
+ # Space available for user text once prefix, random slug and separator "-"
81
+ # are accounted for
82
+ safe_id_max = (
83
+ ENTITY_ID_CHAR_COUNT_MAX
84
+ - INDEX_TAG_CHAR_COUNT
85
+ - len(prefix)
86
+ - (len(random_slug) + 1) # +1 for the hyphen before the slug
87
+ )
88
+
89
+ safe_id_parts: list[str] = [prefix]
90
+
91
+ for word in safe_user_defined_id.split("-"):
92
+ # Trim individual word if it alone would overflow
93
+ safe_slug = word[: safe_id_max - 1] if len(word) > safe_id_max else word
94
+
95
+ # Will the combined ID (so far) overflow if we add this slug?
96
+ prospective_len = len("-".join(safe_id_parts + [safe_slug]))
97
+ if prospective_len >= safe_id_max:
98
+ break
99
+ safe_id_parts.append(safe_slug)
100
+
101
+ safe_id = "-".join(filter(None, safe_id_parts)) + f"-{random_slug}"
102
+ safe_name = _start_case(safe_id)
103
+
104
+ return safe_name, safe_id
105
+
106
+
107
+ def safe_id(prefix: str) -> str:
108
+ """
109
+ Generate a safe ID from a prefix.
110
+
111
+ You can import the `safe_id` function directly from `nextmv`:
112
+
113
+ ```python
114
+ from nextmv import safe_id
115
+ ```
116
+
117
+ Parameters
118
+ ----------
119
+ prefix : str
120
+ Prefix to use for the ID.
121
+
122
+ Returns
123
+ -------
124
+ str
125
+ A safe ID.
126
+
127
+ Examples
128
+ --------
129
+ >>> safe_id("app")
130
+ 'app-4f5g6h7j'
131
+ """
132
+
133
+ random_slug = _nanoid(8)
134
+ # Space available for user text once prefix, random slug and separator "-"
135
+ # are accounted for
136
+ safe_id_max = (
137
+ ENTITY_ID_CHAR_COUNT_MAX - INDEX_TAG_CHAR_COUNT - (len(random_slug) + 1) # +1 for the hyphen before the slug
138
+ )
139
+
140
+ if len(prefix) > safe_id_max:
141
+ return prefix[: safe_id_max - 1] + f"-{random_slug}"
142
+
143
+ safe_id = f"{prefix}-{random_slug}"
144
+
145
+ return safe_id
nextmv/status.py ADDED
@@ -0,0 +1,122 @@
1
+ """
2
+ Provides status enums for Nextmv application runs.
3
+
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
+
8
+ Classes
9
+ -------
10
+ Status
11
+ Deprecated status of a run.
12
+ StatusV2
13
+ Represents the status of a run.
14
+ """
15
+
16
+ from enum import Enum
17
+
18
+
19
+ class Status(str, Enum):
20
+ """
21
+ !!! warning
22
+ `Status` is deprecated, use `StatusV2` instead.
23
+
24
+ Status of a run.
25
+
26
+ You can import the `Status` class directly from `nextmv`:
27
+
28
+ ```python
29
+ from nextmv import Status
30
+ ```
31
+
32
+ This enum represents the possible states of a run. It is deprecated and
33
+ `StatusV2` should be used for new implementations.
34
+
35
+ Attributes
36
+ ----------
37
+ failed : str
38
+ Run failed.
39
+ running : str
40
+ Run is running.
41
+ succeeded : str
42
+ Run succeeded.
43
+
44
+ Examples
45
+ --------
46
+ >>> from nextmv.cloud import Status
47
+ >>> current_status = Status.running
48
+ >>> if current_status == Status.succeeded:
49
+ ... print("Run completed successfully.")
50
+ ... elif current_status == Status.failed:
51
+ ... print("Run failed.")
52
+ ... else:
53
+ ... print(f"Run is currently {current_status.value}.")
54
+ Run is currently running.
55
+
56
+ """
57
+
58
+ failed = "failed"
59
+ """Run failed."""
60
+ running = "running"
61
+ """Run is running."""
62
+ succeeded = "succeeded"
63
+ """Run succeeded."""
64
+
65
+
66
+ class StatusV2(str, Enum):
67
+ """
68
+ Status of a run.
69
+
70
+ You can import the `StatusV2` class directly from `nextmv`:
71
+
72
+ ```python
73
+ from nextmv import StatusV2
74
+ ```
75
+
76
+ This enum represents the comprehensive set of possible states for a run
77
+ in Nextmv.
78
+
79
+ Attributes
80
+ ----------
81
+ canceled : str
82
+ Run was canceled.
83
+ failed : str
84
+ Run failed.
85
+ none : str
86
+ Run has no status.
87
+ queued : str
88
+ Run is queued.
89
+ running : str
90
+ Run is running.
91
+ succeeded : str
92
+ Run succeeded.
93
+
94
+ Examples
95
+ --------
96
+ >>> from nextmv.cloud import StatusV2
97
+ >>> run_status = StatusV2.queued
98
+ >>> print(f"The run status is: {run_status.value}")
99
+ The run status is: queued
100
+
101
+ >>> if run_status == StatusV2.succeeded:
102
+ ... print("Processing complete.")
103
+ ... elif run_status in [StatusV2.queued, StatusV2.running]:
104
+ ... print("Processing in progress.")
105
+ ... else:
106
+ ... print("Processing has not started or has ended with issues.")
107
+ Processing in progress.
108
+
109
+ """
110
+
111
+ canceled = "canceled"
112
+ """Run was canceled."""
113
+ failed = "failed"
114
+ """Run failed."""
115
+ none = "none"
116
+ """Run has no status."""
117
+ queued = "queued"
118
+ """Run is queued."""
119
+ running = "running"
120
+ """Run is running."""
121
+ succeeded = "succeeded"
122
+ """Run succeeded."""
@@ -0,0 +1,311 @@
1
+ Metadata-Version: 2.4
2
+ Name: nextmv
3
+ Version: 1.0.0.dev2
4
+ Summary: The all-purpose Python SDK for Nextmv
5
+ Project-URL: Homepage, https://www.nextmv.io
6
+ Project-URL: Documentation, https://nextmv-py.docs.nextmv.io/en/latest/nextmv/
7
+ Project-URL: Repository, https://github.com/nextmv-io/nextmv-py
8
+ Author-email: Nextmv <tech@nextmv.io>
9
+ Maintainer-email: Nextmv <tech@nextmv.io>
10
+ License: Apache License
11
+ Version 2.0, January 2004
12
+ http://www.apache.org/licenses/
13
+
14
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
15
+
16
+ 1. Definitions.
17
+
18
+ "License" shall mean the terms and conditions for use, reproduction,
19
+ and distribution as defined by Sections 1 through 9 of this document.
20
+
21
+ "Licensor" shall mean the copyright owner or entity authorized by
22
+ the copyright owner that is granting the License.
23
+
24
+ "Legal Entity" shall mean the union of the acting entity and all
25
+ other entities that control, are controlled by, or are under common
26
+ control with that entity. For the purposes of this definition,
27
+ "control" means (i) the power, direct or indirect, to cause the
28
+ direction or management of such entity, whether by contract or
29
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
30
+ outstanding shares, or (iii) beneficial ownership of such entity.
31
+
32
+ "You" (or "Your") shall mean an individual or Legal Entity
33
+ exercising permissions granted by this License.
34
+
35
+ "Source" form shall mean the preferred form for making modifications,
36
+ including but not limited to software source code, documentation
37
+ source, and configuration files.
38
+
39
+ "Object" form shall mean any form resulting from mechanical
40
+ transformation or translation of a Source form, including but
41
+ not limited to compiled object code, generated documentation,
42
+ and conversions to other media types.
43
+
44
+ "Work" shall mean the work of authorship, whether in Source or
45
+ Object form, made available under the License, as indicated by a
46
+ copyright notice that is included in or attached to the work
47
+ (an example is provided in the Appendix below).
48
+
49
+ "Derivative Works" shall mean any work, whether in Source or Object
50
+ form, that is based on (or derived from) the Work and for which the
51
+ editorial revisions, annotations, elaborations, or other modifications
52
+ represent, as a whole, an original work of authorship. For the purposes
53
+ of this License, Derivative Works shall not include works that remain
54
+ separable from, or merely link (or bind by name) to the interfaces of,
55
+ the Work and Derivative Works thereof.
56
+
57
+ "Contribution" shall mean any work of authorship, including
58
+ the original version of the Work and any modifications or additions
59
+ to that Work or Derivative Works thereof, that is intentionally
60
+ submitted to Licensor for inclusion in the Work by the copyright owner
61
+ or by an individual or Legal Entity authorized to submit on behalf of
62
+ the copyright owner. For the purposes of this definition, "submitted"
63
+ means any form of electronic, verbal, or written communication sent
64
+ to the Licensor or its representatives, including but not limited to
65
+ communication on electronic mailing lists, source code control systems,
66
+ and issue tracking systems that are managed by, or on behalf of, the
67
+ Licensor for the purpose of discussing and improving the Work, but
68
+ excluding communication that is conspicuously marked or otherwise
69
+ designated in writing by the copyright owner as "Not a Contribution."
70
+
71
+ "Contributor" shall mean Licensor and any individual or Legal Entity
72
+ on behalf of whom a Contribution has been received by Licensor and
73
+ subsequently incorporated within the Work.
74
+
75
+ 2. Grant of Copyright License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ copyright license to reproduce, prepare Derivative Works of,
79
+ publicly display, publicly perform, sublicense, and distribute the
80
+ Work and such Derivative Works in Source or Object form.
81
+
82
+ 3. Grant of Patent License. Subject to the terms and conditions of
83
+ this License, each Contributor hereby grants to You a perpetual,
84
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
85
+ (except as stated in this section) patent license to make, have made,
86
+ use, offer to sell, sell, import, and otherwise transfer the Work,
87
+ where such license applies only to those patent claims licensable
88
+ by such Contributor that are necessarily infringed by their
89
+ Contribution(s) alone or by combination of their Contribution(s)
90
+ with the Work to which such Contribution(s) was submitted. If You
91
+ institute patent litigation against any entity (including a
92
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
93
+ or a Contribution incorporated within the Work constitutes direct
94
+ or contributory patent infringement, then any patent licenses
95
+ granted to You under this License for that Work shall terminate
96
+ as of the date such litigation is filed.
97
+
98
+ 4. Redistribution. You may reproduce and distribute copies of the
99
+ Work or Derivative Works thereof in any medium, with or without
100
+ modifications, and in Source or Object form, provided that You
101
+ meet the following conditions:
102
+
103
+ (a) You must give any other recipients of the Work or
104
+ Derivative Works a copy of this License; and
105
+
106
+ (b) You must cause any modified files to carry prominent notices
107
+ stating that You changed the files; and
108
+
109
+ (c) You must retain, in the Source form of any Derivative Works
110
+ that You distribute, all copyright, patent, trademark, and
111
+ attribution notices from the Source form of the Work,
112
+ excluding those notices that do not pertain to any part of
113
+ the Derivative Works; and
114
+
115
+ (d) If the Work includes a "NOTICE" text file as part of its
116
+ distribution, then any Derivative Works that You distribute must
117
+ include a readable copy of the attribution notices contained
118
+ within such NOTICE file, excluding those notices that do not
119
+ pertain to any part of the Derivative Works, in at least one
120
+ of the following places: within a NOTICE text file distributed
121
+ as part of the Derivative Works; within the Source form or
122
+ documentation, if provided along with the Derivative Works; or,
123
+ within a display generated by the Derivative Works, if and
124
+ wherever such third-party notices normally appear. The contents
125
+ of the NOTICE file are for informational purposes only and
126
+ do not modify the License. You may add Your own attribution
127
+ notices within Derivative Works that You distribute, alongside
128
+ or as an addendum to the NOTICE text from the Work, provided
129
+ that such additional attribution notices cannot be construed
130
+ as modifying the License.
131
+
132
+ You may add Your own copyright statement to Your modifications and
133
+ may provide additional or different license terms and conditions
134
+ for use, reproduction, or distribution of Your modifications, or
135
+ for any such Derivative Works as a whole, provided Your use,
136
+ reproduction, and distribution of the Work otherwise complies with
137
+ the conditions stated in this License.
138
+
139
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
140
+ any Contribution intentionally submitted for inclusion in the Work
141
+ by You to the Licensor shall be under the terms and conditions of
142
+ this License, without any additional terms or conditions.
143
+ Notwithstanding the above, nothing herein shall supersede or modify
144
+ the terms of any separate license agreement you may have executed
145
+ with Licensor regarding such Contributions.
146
+
147
+ 6. Trademarks. This License does not grant permission to use the trade
148
+ names, trademarks, service marks, or product names of the Licensor,
149
+ except as required for reasonable and customary use in describing the
150
+ origin of the Work and reproducing the content of the NOTICE file.
151
+
152
+ 7. Disclaimer of Warranty. Unless required by applicable law or
153
+ agreed to in writing, Licensor provides the Work (and each
154
+ Contributor provides its Contributions) on an "AS IS" BASIS,
155
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
156
+ implied, including, without limitation, any warranties or conditions
157
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
158
+ PARTICULAR PURPOSE. You are solely responsible for determining the
159
+ appropriateness of using or redistributing the Work and assume any
160
+ risks associated with Your exercise of permissions under this License.
161
+
162
+ 8. Limitation of Liability. In no event and under no legal theory,
163
+ whether in tort (including negligence), contract, or otherwise,
164
+ unless required by applicable law (such as deliberate and grossly
165
+ negligent acts) or agreed to in writing, shall any Contributor be
166
+ liable to You for damages, including any direct, indirect, special,
167
+ incidental, or consequential damages of any character arising as a
168
+ result of this License or out of the use or inability to use the
169
+ Work (including but not limited to damages for loss of goodwill,
170
+ work stoppage, computer failure or malfunction, or any and all
171
+ other commercial damages or losses), even if such Contributor
172
+ has been advised of the possibility of such damages.
173
+
174
+ 9. Accepting Warranty or Additional Liability. While redistributing
175
+ the Work or Derivative Works thereof, You may choose to offer,
176
+ and charge a fee for, acceptance of support, warranty, indemnity,
177
+ or other liability obligations and/or rights consistent with this
178
+ License. However, in accepting such obligations, You may act only
179
+ on Your own behalf and on Your sole responsibility, not on behalf
180
+ of any other Contributor, and only if You agree to indemnify,
181
+ defend, and hold each Contributor harmless for any liability
182
+ incurred by, or claims asserted against, such Contributor by reason
183
+ of your accepting any such warranty or additional liability.
184
+
185
+ END OF TERMS AND CONDITIONS
186
+
187
+ APPENDIX: How to apply the Apache License to your work.
188
+
189
+ To apply the Apache License to your work, attach the following
190
+ boilerplate notice, with the fields enclosed by brackets "[]"
191
+ replaced with your own identifying information. (Don't include
192
+ the brackets!) The text should be enclosed in the appropriate
193
+ comment syntax for the file format. We also recommend that a
194
+ file or class name and description of purpose be included on the
195
+ same "printed page" as the copyright notice for easier
196
+ identification within third-party archives.
197
+
198
+ Copyright 2022-2023 nextmv.io inc.
199
+
200
+ Licensed under the Apache License, Version 2.0 (the "License");
201
+ you may not use this file except in compliance with the License.
202
+ You may obtain a copy of the License at
203
+
204
+ http://www.apache.org/licenses/LICENSE-2.0
205
+
206
+ Unless required by applicable law or agreed to in writing, software
207
+ distributed under the License is distributed on an "AS IS" BASIS,
208
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
209
+ See the License for the specific language governing permissions and
210
+ limitations under the License.
211
+ License-File: LICENSE
212
+ Keywords: decision engineering,decision science,decisions,nextmv,operations research,optimization,shift scheduling,solver,vehicle routing problem
213
+ Classifier: License :: OSI Approved :: Apache Software License
214
+ Classifier: Operating System :: OS Independent
215
+ Classifier: Programming Language :: Python :: 3
216
+ Classifier: Programming Language :: Python :: 3.10
217
+ Classifier: Programming Language :: Python :: 3.11
218
+ Classifier: Programming Language :: Python :: 3.12
219
+ Classifier: Programming Language :: Python :: 3.13
220
+ Requires-Python: >=3.10
221
+ Requires-Dist: pydantic>=2.5.2
222
+ Requires-Dist: pyyaml>=6.0.1
223
+ Requires-Dist: requests>=2.31.0
224
+ Requires-Dist: typer>=0.20.1
225
+ Requires-Dist: urllib3>=2.1.0
226
+ Provides-Extra: all
227
+ Requires-Dist: folium>=0.20.0; extra == 'all'
228
+ Requires-Dist: plotly>=6.0.1; extra == 'all'
229
+ Provides-Extra: dev
230
+ Requires-Dist: build>=1.0.3; extra == 'dev'
231
+ Requires-Dist: folium>=0.20.0; extra == 'dev'
232
+ Requires-Dist: mlflow>=2.19.0; extra == 'dev'
233
+ Requires-Dist: nextroute>=1.11.1; extra == 'dev'
234
+ Requires-Dist: openpyxl>=3.1.5; extra == 'dev'
235
+ Requires-Dist: pandas>=2.2.3; extra == 'dev'
236
+ Requires-Dist: plotly>=6.0.1; extra == 'dev'
237
+ Requires-Dist: pydantic>=2.5.2; extra == 'dev'
238
+ Requires-Dist: pyyaml>=6.0.1; extra == 'dev'
239
+ Requires-Dist: requests>=2.31.0; extra == 'dev'
240
+ Requires-Dist: ruff>=0.1.7; extra == 'dev'
241
+ Requires-Dist: twine>=4.0.2; extra == 'dev'
242
+ Requires-Dist: urllib3>=2.1.0; extra == 'dev'
243
+ Provides-Extra: notebook
244
+ Requires-Dist: mlflow>=2.19.0; extra == 'notebook'
245
+ Description-Content-Type: text/markdown
246
+
247
+ # Nextmv Python SDK
248
+
249
+ <!-- markdownlint-disable MD033 MD013 -->
250
+
251
+ <p align="center">
252
+ <a href="https://nextmv.io"><img src="https://cdn.prod.website-files.com/60dee0fad10d14c8ab66dd74/674628a824bc14307c1727aa_blog-prototype-p-2000.png" alt="Nextmv" width="45%"></a>
253
+ </p>
254
+ <p align="center">
255
+ <em>Nextmv: The home for all your optimization work</em>
256
+ </p>
257
+ <p align="center">
258
+ <a href="https://pypi.org/project/nextmv" target="_blank">
259
+ <img src="https://img.shields.io/pypi/pyversions/nextmv.svg?color=%2334D058" alt="Supported Python versions">
260
+ </a>
261
+ <a href="https://pypi.org/project/nextmv" target="_blank">
262
+ <img src="https://img.shields.io/pypi/v/nextmv?color=%2334D058&label=nextmv" alt="Package version">
263
+ </a>
264
+ </p>
265
+
266
+ <!-- markdownlint-enable MD033 MD013 -->
267
+
268
+ Welcome to `nextmv`, the general Python SDK for the Nextmv Platform.
269
+
270
+ 📖 To learn more about `nextmv`, visit the [docs][docs].
271
+
272
+ ## Installation
273
+
274
+ Requires Python `>=3.10`. Install using the Python package manager of your
275
+ choice:
276
+
277
+ - `pip`
278
+
279
+ ```bash
280
+ pip install nextmv
281
+ ```
282
+
283
+ - `pipx`
284
+
285
+ ```bash
286
+ pipx install nextmv
287
+ ```
288
+
289
+ - `uv`
290
+
291
+ ```bash
292
+ uv tool install nextmv
293
+ ```
294
+
295
+ Install all optional dependencies (recommended) by specifying `"nextmv[all]"`
296
+ instead of just `"nextmv"`.
297
+
298
+ ## CLI
299
+
300
+ The Nextmv CLI is installed automatically with the SDK. To verify installation,
301
+ run:
302
+
303
+ ```bash
304
+ nextmv --help
305
+ ```
306
+
307
+ If you are contributing to the CLI, please make sure you read the [CLI
308
+ Contributing Guide][cli-contributing].
309
+
310
+ [docs]: https://nextmv-py.docs.nextmv.io/en/latest/nextmv/
311
+ [cli-contributing]: nextmv/cli/CONTRIBUTING.md