validio-cli 9.2.0__tar.gz → 10.0.1__tar.gz

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 (29) hide show
  1. {validio_cli-9.2.0 → validio_cli-10.0.1}/PKG-INFO +11 -14
  2. {validio_cli-9.2.0 → validio_cli-10.0.1}/pyproject.toml +53 -32
  3. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/__init__.py +37 -1
  4. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/code.py +4 -4
  5. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/namespaces.py +5 -6
  6. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/resources.py +0 -1
  7. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/sources.py +0 -4
  8. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/users.py +7 -2
  9. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/main.py +5 -5
  10. validio_cli-10.0.1/validio_cli/metadata.py +13 -0
  11. validio_cli-9.2.0/LICENSE +0 -201
  12. validio_cli-9.2.0/validio_cli/metadata.py +0 -10
  13. {validio_cli-9.2.0 → validio_cli-10.0.1}/README_PUBLIC.md +0 -0
  14. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/channels.py +0 -0
  15. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/config.py +0 -0
  16. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/credentials.py +0 -0
  17. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/dbt.py +0 -0
  18. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/filters.py +0 -0
  19. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/incidents.py +0 -0
  20. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/integrations.py +0 -0
  21. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/metrics.py +0 -0
  22. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/notification_rules.py +0 -0
  23. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/segmentations.py +0 -0
  24. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/segments.py +0 -0
  25. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/validators.py +0 -0
  26. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/bin/entities/windows.py +0 -0
  27. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/components.py +0 -0
  28. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/namespace.py +0 -0
  29. {validio_cli-9.2.0 → validio_cli-10.0.1}/validio_cli/schema.py +0 -0
@@ -1,28 +1,26 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: validio-cli
3
- Version: 9.2.0
3
+ Version: 10.0.1
4
4
  Summary: CLI tool to interact with the Validio platform
5
- License: Apache-2.0
6
- License-File: LICENSE
7
5
  Author: Validio
8
- Author-email: support@validio.io
9
- Requires-Python: >=3.10,<4.0
10
- Classifier: License :: OSI Approved :: Apache Software License
6
+ Author-email: Validio <support@validio.io>
7
+ License-Expression: Apache-2.0
11
8
  Classifier: Programming Language :: Python :: 3
12
9
  Classifier: Programming Language :: Python :: 3.10
13
10
  Classifier: Programming Language :: Python :: 3.11
14
11
  Classifier: Programming Language :: Python :: 3.12
15
12
  Classifier: Programming Language :: Python :: 3.13
16
13
  Classifier: Programming Language :: Python :: 3.14
17
- Requires-Dist: camel-converter (>=3.0.0,<4.0.0)
18
- Requires-Dist: classdiff (>=0.5.2,<0.6.0)
19
- Requires-Dist: prompt-toolkit (>=3.0.38,<4.0.0)
20
- Requires-Dist: tabulate (>=0.9.0,<0.10.0)
21
- Requires-Dist: typer[all] (>=0.8.0,<0.16.0)
22
- Requires-Dist: types-tabulate (>=0.9.0.2,<0.10.0.0)
14
+ Requires-Dist: camel-converter>=3.0.0,<4
15
+ Requires-Dist: classdiff>=0.5.2,<0.6
16
+ Requires-Dist: typer[all]>=0.8.0,<0.16.0
17
+ Requires-Dist: prompt-toolkit>=3.0.38,<4
18
+ Requires-Dist: tabulate>=0.9.0,<0.10
19
+ Requires-Dist: types-tabulate>=0.9.0.2,<0.10
23
20
  Requires-Dist: validio-sdk
24
- Project-URL: Documentation, https://docs.validio.io/
21
+ Requires-Python: >=3.10, <4
25
22
  Project-URL: Homepage, https://validio.io/
23
+ Project-URL: Documentation, https://docs.validio.io/
26
24
  Description-Content-Type: text/markdown
27
25
 
28
26
  # validio-cli
@@ -42,4 +40,3 @@ validio --help
42
40
  ```
43
41
 
44
42
  [Validio]: https://validio.io
45
-
@@ -1,41 +1,59 @@
1
- [tool.poetry]
1
+ [project]
2
2
  name = "validio-cli"
3
- # This version does not represent the released version or any tag. For each
4
- # release we automatically bump this before building and publishing so this
5
- # should be kept at 0.0.1dev1
6
- version = "9.2.0"
3
+ version = "10.0.1"
7
4
  description = "CLI tool to interact with the Validio platform"
8
- authors = ["Validio <support@validio.io>"]
9
- license = "Apache-2.0"
10
- homepage = "https://validio.io/"
11
- documentation = "https://docs.validio.io/"
12
- packages = [{ include = "validio_cli" }]
5
+ authors = [{ name = "Validio", email = "support@validio.io" }]
6
+ requires-python = ">=3.10,<4"
13
7
  readme = "README_PUBLIC.md"
8
+ license = "Apache-2.0"
9
+ classifiers = [
10
+ "Programming Language :: Python :: 3",
11
+ "Programming Language :: Python :: 3.10",
12
+ "Programming Language :: Python :: 3.11",
13
+ "Programming Language :: Python :: 3.12",
14
+ "Programming Language :: Python :: 3.13",
15
+ "Programming Language :: Python :: 3.14",
16
+ ]
17
+ dependencies = [
18
+ "camel-converter>=3.0.0,<4",
19
+ "classdiff>=0.5.2,<0.6",
20
+ "typer[all]>=0.8.0,<0.16.0",
21
+ "prompt-toolkit>=3.0.38,<4",
22
+ "tabulate>=0.9.0,<0.10",
23
+ "types-tabulate>=0.9.0.2,<0.10",
24
+ "validio-sdk",
25
+ ]
14
26
 
15
- [tool.poetry.dependencies]
16
- python = "^3.10"
17
- camel-converter = "^3.0.0"
18
- classdiff = "^0.5.2"
19
- typer = { extras = ["all"], version = ">=0.8.0,<0.16.0" }
20
- prompt-toolkit = "^3.0.38"
21
- tabulate = "^0.9.0"
22
- types-tabulate = "^0.9.0.2"
23
- validio-sdk = "*"
27
+ [project.urls]
28
+ Homepage = "https://validio.io/"
29
+ Documentation = "https://docs.validio.io/"
24
30
 
25
- [tool.poetry.group.dev.dependencies]
26
- ruff = "^0.9.6"
27
- mypy = "^1.2.0"
28
- licensecheck = "^2025.1.0"
29
- pytest = "^7.4.3"
30
- flameprof = "^0.4"
31
- validio-sdk = { path = "../validio-sdk", develop = true }
31
+ [project.scripts]
32
+ validio = "validio_cli.bin.main:main"
32
33
 
33
- [build-system]
34
- requires = ["poetry-core"]
35
- build-backend = "poetry.core.masonry.api"
34
+ [dependency-groups]
35
+ dev = [
36
+ "ruff==0.15.17",
37
+ "mypy>=1.2.0,<2",
38
+ "licensecheck>=2025.1.0,<2026",
39
+ "pytest>=7.4.3,<8",
40
+ "flameprof>=0.4,<0.5",
41
+ "validio-sdk",
42
+ ]
36
43
 
37
- [tool.poetry.scripts]
38
- validio = "validio_cli.bin.main:main"
44
+ [tool.uv]
45
+ default-groups = "all"
46
+
47
+ [tool.uv.sources]
48
+ validio-sdk = { path = "../validio-sdk", editable = true }
49
+
50
+ [tool.uv.build-backend]
51
+ module-name = ["validio_cli"]
52
+ module-root = ""
53
+
54
+ [build-system]
55
+ requires = ["uv_build>=0.9.5,<0.10.0"]
56
+ build-backend = "uv_build"
39
57
 
40
58
  [tool.ruff]
41
59
  fix = true
@@ -64,12 +82,15 @@ ignore = [
64
82
  "D203", # `one-blank-line-before-class` Incompatible with D211
65
83
  "D212", # `multi-line-summary-first-line` Incompatible with D213
66
84
  "PLR0913", # `too-many-arguments` - Not relevant with only 6
85
+ "PLC0415", # Imports are intentionally lazy (circular dependencies / startup perf)
67
86
  ]
68
87
 
69
88
  [tool.ruff.lint.per-file-ignores]
70
89
  # No need for documentation in these files
71
90
  "__init__.py" = ["D"]
72
- "*/bin/*.py" = ["D"]
91
+ # typer evaluates annotations at runtime and does not support PEP 604
92
+ # (`X | Y`) unions, so keep the legacy `Union`/`Optional` syntax here
93
+ "*/bin/*.py" = ["D", "UP007", "UP045"]
73
94
  "examples/*.py" = ["D"]
74
95
 
75
96
  [tool.mypy]
@@ -11,20 +11,32 @@ from pathlib import Path
11
11
  from types import EllipsisType
12
12
  from typing import Any, TypeVar
13
13
 
14
+ import click
14
15
  import typer
15
16
  from camel_converter import to_snake
16
17
  from tabulate import tabulate
17
18
  from validio_sdk import config
18
19
  from validio_sdk._api.api import APIClient
20
+ from validio_sdk.client import USER_AGENT as SDK_USER_AGENT
19
21
  from validio_sdk.config import Config, ValidioConfig
20
22
  from validio_sdk.features import Feature, all_features, set_enabled
21
23
  from validio_sdk.util import ClassJSONEncoder
22
24
 
25
+ from validio_cli.metadata import version as cli_version
26
+
23
27
  F = TypeVar("F", bound=Callable[..., Any])
24
28
  T = TypeVar("T", bound="OutputSettings")
25
29
 
26
30
  DEFAULT_NAMESPACE: str = "default"
27
31
 
32
+ # User-Agent sent for all CLI requests. We report both the CLI version and the
33
+ # SDK version it builds on.
34
+ CLI_USER_AGENT = f"validio-cli@{cli_version()} {SDK_USER_AGENT}"
35
+ # Header reporting the CLI command (e.g. `channels get`)
36
+ CLI_COMMAND_HEADER = "x-validio-cli-command"
37
+ # Header flagging IaC operations (`validio code` plan/apply/import).
38
+ IAC_HEADER = "x-validio-iac"
39
+
28
40
 
29
41
  class OutputFormat(str, Enum):
30
42
  """Available output formats for the CLI"""
@@ -89,11 +101,35 @@ class AsyncTyper(typer.Typer):
89
101
  return decorator
90
102
 
91
103
 
104
+ def _cli_headers(iac: bool = False) -> dict[str, str]:
105
+ """Build the CLI headers for an outgoing request.
106
+
107
+ :param iac: Whether the request originates from an IaC operation.
108
+ """
109
+ headers: dict[str, str] = {}
110
+
111
+ ctx = click.get_current_context(silent=True)
112
+ if ctx is not None:
113
+ # `command_path` is e.g. "validio channels get",
114
+ # drop the program name to get the command itself.
115
+ command = " ".join(ctx.command_path.split()[1:])
116
+ if command:
117
+ headers[CLI_COMMAND_HEADER] = command
118
+
119
+ if iac:
120
+ headers[IAC_HEADER] = "true"
121
+
122
+ return headers
123
+
124
+
92
125
  def get_client(
93
126
  config_dir: str = ConfigDir,
127
+ user_agent: str = CLI_USER_AGENT,
128
+ iac: bool = False,
94
129
  ) -> tuple[APIClient, ValidioConfig]:
95
130
  cfg = Config(Path(config_dir)).read()
96
- return APIClient(config=cfg), cfg
131
+ headers = _cli_headers(iac=iac)
132
+ return APIClient(config=cfg, user_agent=user_agent, headers=headers), cfg
97
133
 
98
134
 
99
135
  @dataclass
@@ -97,7 +97,7 @@ diff_option = typer.Option(
97
97
  )
98
98
 
99
99
  color_option = typer.Option(
100
- not os.environ.get("NO_COLOR", False) and sys.stdout.isatty(),
100
+ not os.environ.get("NO_COLOR") and sys.stdout.isatty(),
101
101
  help="Enable colored output",
102
102
  )
103
103
 
@@ -188,7 +188,7 @@ async def plan(
188
188
  progress: bool = show_progress_option,
189
189
  ) -> None:
190
190
  dir_path = directory_or_default(directory)
191
- client, _ = get_client(config_dir)
191
+ client, _ = get_client(config_dir, iac=True)
192
192
 
193
193
  schema_reinference = create_source_schema_reinference(
194
194
  update_schema, update_all_schemas
@@ -258,7 +258,7 @@ async def apply(
258
258
  ),
259
259
  ) -> None:
260
260
  dir_path = directory_or_default(directory)
261
- client, _ = get_client(config_dir)
261
+ client, _ = get_client(config_dir, iac=True)
262
262
 
263
263
  schema_reinference = create_source_schema_reinference(
264
264
  update_schema, update_all_schemas
@@ -374,7 +374,7 @@ async def _import(
374
374
  )
375
375
 
376
376
  dir_path = directory_or_default(directory)
377
- client, _ = get_client(config_dir)
377
+ client, _ = get_client(config_dir, iac=True)
378
378
  namespace = get_namespace(dir_path)
379
379
 
380
380
  if import_namespace:
@@ -158,10 +158,10 @@ async def update(
158
158
  "--role is specified but no --member or --api-key to assign the role"
159
159
  )
160
160
 
161
- role_configs = await vc.get_namespace_role_configs()
162
161
  ns_api_keys, ns_members = [], []
163
162
 
164
163
  if role:
164
+ role_configs = await vc.get_namespace_role_configs()
165
165
  role_id = _find_role_id(role_configs, role)
166
166
  for ak in api_key:
167
167
  ns_api_keys.append({"id": ak, "roleId": role_id})
@@ -179,7 +179,7 @@ async def update(
179
179
  api_keys = [
180
180
  {
181
181
  "id": ns_roles["apiKey"]["id"],
182
- "roleId": _find_role_id(role_configs, ns_roles["role"]),
182
+ "roleId": ns_roles["roleConfig"]["id"],
183
183
  }
184
184
  for ns_roles in namespace.get("apiKeys", {})
185
185
  if ns_roles["apiKey"]["id"] not in api_key
@@ -188,7 +188,7 @@ async def update(
188
188
  members = [
189
189
  {
190
190
  "id": ns_roles["user"]["id"],
191
- "roleId": _find_role_id(role_configs, ns_roles["role"]),
191
+ "roleId": ns_roles["roleConfig"]["id"],
192
192
  }
193
193
  for ns_roles in namespace["members"]
194
194
  if ns_roles["user"]["id"] not in member
@@ -238,9 +238,8 @@ async def remove(
238
238
 
239
239
 
240
240
  def _find_role_id(role_configs: list[dict[str, Any]], role_name: str) -> str:
241
- # Accept either the role id or a case-insensitive role name the server
242
- # returns `role` as a scalar on existing members/apiKeys and the format is
243
- # not guaranteed, so we tolerate both.
241
+ # Accept either the role id or a case-insensitive role name since the
242
+ # user can pass both via --role.
244
243
  for rc in role_configs:
245
244
  if rc["id"] == role_name or rc["name"].casefold() == role_name.casefold():
246
245
  return rc["id"]
@@ -19,7 +19,6 @@ app = AsyncTyper(help="Manage resources")
19
19
 
20
20
 
21
21
  @app.async_command(help=f"{BETA_BANNER} Move resources from one namespace to another")
22
- # ruff: noqa: PLR0912
23
22
  async def move(
24
23
  config_dir: str = ConfigDir,
25
24
  auto_approve: bool = typer.Option(
@@ -188,7 +188,6 @@ async def prompt_for_start_all_sources(
188
188
  async def start(
189
189
  config_dir: str = ConfigDir,
190
190
  output_format: OutputFormat = OutputFormatOption,
191
- # ruff: noqa: ARG001
192
191
  namespace: str = Namespace(),
193
192
  all: bool = typer.Option(False, "--all", help="Start all unstarted sources"),
194
193
  auto_approve: bool = typer.Option(
@@ -229,7 +228,6 @@ async def start(
229
228
  async def stop(
230
229
  config_dir: str = ConfigDir,
231
230
  output_format: OutputFormat = OutputFormatOption,
232
- # ruff: noqa: ARG001
233
231
  namespace: str = Namespace(),
234
232
  identifiers: list[str] = Identifiers,
235
233
  ) -> None:
@@ -249,7 +247,6 @@ async def stop(
249
247
  async def backfill(
250
248
  config_dir: str = ConfigDir,
251
249
  output_format: OutputFormat = OutputFormatOption,
252
- # ruff: noqa: ARG001
253
250
  namespace: str = Namespace(),
254
251
  identifiers: list[str] = Identifiers,
255
252
  ) -> None:
@@ -269,7 +266,6 @@ async def backfill(
269
266
  async def reset(
270
267
  config_dir: str = ConfigDir,
271
268
  output_format: OutputFormat = OutputFormatOption,
272
- # ruff: noqa: ARG001
273
269
  namespace: str = Namespace(),
274
270
  identifiers: list[str] = Identifiers,
275
271
  ) -> None:
@@ -32,9 +32,14 @@ async def get(
32
32
  users,
33
33
  fields={
34
34
  "name": OutputSettings(attribute_name="resourceName"),
35
- "global_role": OutputSettings(attribute_name="globalRole"),
35
+ "global_roles": OutputSettings(
36
+ attribute_name="assignedGlobalRoles",
37
+ reformat=lambda x: ", ".join(
38
+ sorted(r["role"]["name"] for r in x["roles"])
39
+ ),
40
+ ),
36
41
  "status": None,
37
- "identities": OutputSettings(reformat=lambda x: len(x)),
42
+ "identities": OutputSettings(reformat=len),
38
43
  "age": OutputSettings.string_as_datetime(attribute_name="createdAt"),
39
44
  },
40
45
  )
@@ -1,6 +1,7 @@
1
1
  import os
2
2
  import shutil
3
3
  import sys
4
+ from pathlib import Path
4
5
  from typing import Optional
5
6
 
6
7
  import typer
@@ -100,7 +101,6 @@ def version() -> None:
100
101
  def plugins(
101
102
  ctx: typer.Context,
102
103
  # We need to keep this for typer
103
- # ruff: noqa: UP007
104
104
  plugin: Optional[str] = typer.Argument(
105
105
  None,
106
106
  help="Plugin to run. Leave empty to list available plugins.",
@@ -140,7 +140,7 @@ def plugins(
140
140
 
141
141
  os.execve(
142
142
  plugin_path,
143
- [plugin_path] + sys.argv[3:],
143
+ [plugin_path, *sys.argv[3:]],
144
144
  # If someone wants to write a plugin with tooling that doesn't have an
145
145
  # SDK we kindly pass the credentials to the environment so you can
146
146
  # easily call Validio anyway.
@@ -162,9 +162,9 @@ def _list_executables() -> None:
162
162
  try:
163
163
  executables.update(
164
164
  {
165
- filename.lstrip("validio-")
166
- for filename in os.listdir(path)
167
- if filename.startswith("validio-")
165
+ entry.name.lstrip("validio-")
166
+ for entry in Path(path).iterdir()
167
+ if entry.name.startswith("validio-")
168
168
  }
169
169
  )
170
170
  except FileNotFoundError:
@@ -0,0 +1,13 @@
1
+ """Metadata information about the package."""
2
+
3
+ import importlib.metadata
4
+
5
+
6
+ def version() -> str:
7
+ """Get the version of the CLI from the metadata."""
8
+ try:
9
+ return importlib.metadata.version(
10
+ "validio-cli"
11
+ ) # This needs to match the distribution package name
12
+ except importlib.metadata.PackageNotFoundError:
13
+ return "local-dev"
validio_cli-9.2.0/LICENSE DELETED
@@ -1,201 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright 2023 Validio AB
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
@@ -1,10 +0,0 @@
1
- """Metadata information about the package."""
2
-
3
- import importlib.metadata
4
-
5
-
6
- def version() -> str:
7
- """Get the version of the CLI from the metadata."""
8
- return importlib.metadata.version(
9
- "validio-cli"
10
- ) # This needs to match the distribution package name