datamasque-cli 1.0.0__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 (67) hide show
  1. datamasque_cli-1.0.0/.github/workflows/ci.yml +91 -0
  2. datamasque_cli-1.0.0/.github/workflows/release-testpypi.yml +60 -0
  3. datamasque_cli-1.0.0/.github/workflows/release.yml +62 -0
  4. datamasque_cli-1.0.0/.gitignore +11 -0
  5. datamasque_cli-1.0.0/CHANGELOG.md +5 -0
  6. datamasque_cli-1.0.0/CONTRIBUTING.md +231 -0
  7. datamasque_cli-1.0.0/LICENSE +201 -0
  8. datamasque_cli-1.0.0/Makefile +68 -0
  9. datamasque_cli-1.0.0/NOTICE +4 -0
  10. datamasque_cli-1.0.0/PKG-INFO +269 -0
  11. datamasque_cli-1.0.0/README.md +239 -0
  12. datamasque_cli-1.0.0/assets/demo.gif +0 -0
  13. datamasque_cli-1.0.0/claude-skills/README.md +46 -0
  14. datamasque_cli-1.0.0/claude-skills/datamasque-cli/SKILL.md +187 -0
  15. datamasque_cli-1.0.0/claude-skills/ruleset-builder/SKILL.md +175 -0
  16. datamasque_cli-1.0.0/claude-skills/ruleset-builder/references/hash-columns-guide.md +145 -0
  17. datamasque_cli-1.0.0/claude-skills/ruleset-builder/references/mask-definitions-guide.md +189 -0
  18. datamasque_cli-1.0.0/claude-skills/ruleset-builder/references/ruleset-libraries-guide.md +165 -0
  19. datamasque_cli-1.0.0/claude-skills/ruleset-builder/references/ruleset-yaml-reference.md +174 -0
  20. datamasque_cli-1.0.0/claude-skills/ruleset-splitter/SKILL.md +78 -0
  21. datamasque_cli-1.0.0/pyproject.toml +132 -0
  22. datamasque_cli-1.0.0/scripts/active_profile_env.py +29 -0
  23. datamasque_cli-1.0.0/scripts/bump_version.py +40 -0
  24. datamasque_cli-1.0.0/src/datamasque_cli/__init__.py +0 -0
  25. datamasque_cli-1.0.0/src/datamasque_cli/client.py +109 -0
  26. datamasque_cli-1.0.0/src/datamasque_cli/commands/__init__.py +0 -0
  27. datamasque_cli-1.0.0/src/datamasque_cli/commands/auth.py +154 -0
  28. datamasque_cli-1.0.0/src/datamasque_cli/commands/connections.py +325 -0
  29. datamasque_cli-1.0.0/src/datamasque_cli/commands/discovery.py +136 -0
  30. datamasque_cli-1.0.0/src/datamasque_cli/commands/files.py +77 -0
  31. datamasque_cli-1.0.0/src/datamasque_cli/commands/ruleset_libraries.py +156 -0
  32. datamasque_cli-1.0.0/src/datamasque_cli/commands/rulesets.py +303 -0
  33. datamasque_cli-1.0.0/src/datamasque_cli/commands/runs.py +526 -0
  34. datamasque_cli-1.0.0/src/datamasque_cli/commands/seeds.py +56 -0
  35. datamasque_cli-1.0.0/src/datamasque_cli/commands/system.py +118 -0
  36. datamasque_cli-1.0.0/src/datamasque_cli/commands/users.py +86 -0
  37. datamasque_cli-1.0.0/src/datamasque_cli/config.py +82 -0
  38. datamasque_cli-1.0.0/src/datamasque_cli/main.py +58 -0
  39. datamasque_cli-1.0.0/src/datamasque_cli/output.py +133 -0
  40. datamasque_cli-1.0.0/src/datamasque_cli/py.typed +0 -0
  41. datamasque_cli-1.0.0/tests/__init__.py +0 -0
  42. datamasque_cli-1.0.0/tests/commands/__init__.py +0 -0
  43. datamasque_cli-1.0.0/tests/commands/test_auth.py +130 -0
  44. datamasque_cli-1.0.0/tests/commands/test_connections.py +293 -0
  45. datamasque_cli-1.0.0/tests/commands/test_discovery.py +125 -0
  46. datamasque_cli-1.0.0/tests/commands/test_files.py +42 -0
  47. datamasque_cli-1.0.0/tests/commands/test_ruleset_libraries.py +65 -0
  48. datamasque_cli-1.0.0/tests/commands/test_rulesets.py +392 -0
  49. datamasque_cli-1.0.0/tests/commands/test_runs.py +542 -0
  50. datamasque_cli-1.0.0/tests/commands/test_seeds.py +36 -0
  51. datamasque_cli-1.0.0/tests/commands/test_system.py +38 -0
  52. datamasque_cli-1.0.0/tests/commands/test_users.py +34 -0
  53. datamasque_cli-1.0.0/tests/conftest.py +49 -0
  54. datamasque_cli-1.0.0/tests/integration/README.md +54 -0
  55. datamasque_cli-1.0.0/tests/integration/__init__.py +0 -0
  56. datamasque_cli-1.0.0/tests/integration/conftest.py +167 -0
  57. datamasque_cli-1.0.0/tests/integration/test_connections.py +51 -0
  58. datamasque_cli-1.0.0/tests/integration/test_delete_safety.py +20 -0
  59. datamasque_cli-1.0.0/tests/integration/test_rulesets.py +84 -0
  60. datamasque_cli-1.0.0/tests/integration/test_runs.py +114 -0
  61. datamasque_cli-1.0.0/tests/test_client_auth.py +63 -0
  62. datamasque_cli-1.0.0/tests/test_client_env.py +80 -0
  63. datamasque_cli-1.0.0/tests/test_client_profile.py +40 -0
  64. datamasque_cli-1.0.0/tests/test_config.py +113 -0
  65. datamasque_cli-1.0.0/tests/test_output.py +74 -0
  66. datamasque_cli-1.0.0/tests/test_version.py +23 -0
  67. datamasque_cli-1.0.0/uv.lock +643 -0
@@ -0,0 +1,91 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ci-${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
12
+
13
+ jobs:
14
+ lint:
15
+ name: Lint (ruff)
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Set up uv
21
+ uses: astral-sh/setup-uv@v5
22
+ with:
23
+ enable-cache: true
24
+
25
+ - name: Set up Python
26
+ run: uv python install 3.12
27
+
28
+ - name: Install dependencies
29
+ run: uv sync --frozen
30
+
31
+ - name: ruff check
32
+ run: uv run ruff check src tests
33
+
34
+ - name: ruff format --check
35
+ run: uv run ruff format --check src tests
36
+
37
+ typecheck:
38
+ name: Typecheck (mypy)
39
+ runs-on: ubuntu-latest
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+
43
+ - name: Set up uv
44
+ uses: astral-sh/setup-uv@v5
45
+ with:
46
+ enable-cache: true
47
+
48
+ - name: Set up Python
49
+ run: uv python install 3.12
50
+
51
+ - name: Install dependencies
52
+ run: uv sync --frozen
53
+
54
+ - name: mypy
55
+ run: uv run mypy src
56
+
57
+ test:
58
+ name: Tests (py${{ matrix.python-version }})
59
+ runs-on: ubuntu-latest
60
+ strategy:
61
+ fail-fast: false
62
+ matrix:
63
+ python-version: ['3.11', '3.12', '3.13']
64
+ steps:
65
+ - uses: actions/checkout@v4
66
+
67
+ - name: Set up uv
68
+ uses: astral-sh/setup-uv@v5
69
+ with:
70
+ enable-cache: true
71
+
72
+ - name: Set up Python ${{ matrix.python-version }}
73
+ run: uv python install ${{ matrix.python-version }}
74
+
75
+ - name: Install dependencies
76
+ run: uv sync --frozen --python ${{ matrix.python-version }}
77
+
78
+ - name: pytest
79
+ run: >-
80
+ uv run --python ${{ matrix.python-version }}
81
+ pytest tests/
82
+ --junitxml=report.xml
83
+ --import-mode=importlib
84
+
85
+ - name: Upload test results
86
+ if: always()
87
+ uses: actions/upload-artifact@v4
88
+ with:
89
+ name: test-results-py${{ matrix.python-version }}
90
+ path: report.xml
91
+ retention-days: 7
@@ -0,0 +1,60 @@
1
+ name: Release (TestPyPI)
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ build:
8
+ name: Build sdist and wheel
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+
13
+ - name: Set up uv
14
+ uses: astral-sh/setup-uv@v5
15
+ with:
16
+ enable-cache: true
17
+
18
+ - name: Set up Python
19
+ run: uv python install 3.12
20
+
21
+ - name: Show package version
22
+ run: |
23
+ VERSION="$(uv run python -c 'import tomllib; print(tomllib.loads(open("pyproject.toml","rb").read().decode())["project"]["version"])')"
24
+ echo "Publishing version: ${VERSION}"
25
+ echo "::notice title=TestPyPI version::${VERSION}"
26
+
27
+ - name: Build
28
+ run: uv build
29
+
30
+ - name: Validate distributions
31
+ run: uvx twine check dist/*
32
+
33
+ - name: Upload distributions
34
+ uses: actions/upload-artifact@v4
35
+ with:
36
+ name: dist-testpypi
37
+ path: dist/
38
+ retention-days: 7
39
+
40
+ publish:
41
+ name: Publish to TestPyPI
42
+ needs: build
43
+ runs-on: ubuntu-latest
44
+ environment:
45
+ name: testpypi
46
+ url: https://test.pypi.org/p/datamasque-cli
47
+ permissions:
48
+ id-token: write
49
+ contents: read
50
+ steps:
51
+ - name: Download distributions
52
+ uses: actions/download-artifact@v4
53
+ with:
54
+ name: dist-testpypi
55
+ path: dist/
56
+
57
+ - name: Publish to TestPyPI
58
+ uses: pypa/gh-action-pypi-publish@release/v1
59
+ with:
60
+ repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,62 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*.*.*'
7
+
8
+ jobs:
9
+ build:
10
+ name: Build sdist and wheel
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - name: Set up uv
16
+ uses: astral-sh/setup-uv@v5
17
+ with:
18
+ enable-cache: true
19
+
20
+ - name: Set up Python
21
+ run: uv python install 3.12
22
+
23
+ - name: Verify tag matches package version
24
+ run: |
25
+ TAG_VERSION="${GITHUB_REF_NAME#v}"
26
+ PKG_VERSION="$(uv run python -c 'import tomllib,sys; print(tomllib.loads(open("pyproject.toml","rb").read().decode())["project"]["version"])')"
27
+ echo "Tag version: ${TAG_VERSION}"
28
+ echo "Package version: ${PKG_VERSION}"
29
+ if [ "${TAG_VERSION}" != "${PKG_VERSION}" ]; then
30
+ echo "::error::Tag ${GITHUB_REF_NAME} does not match pyproject.toml version ${PKG_VERSION}"
31
+ exit 1
32
+ fi
33
+
34
+ - name: Build
35
+ run: uv build
36
+
37
+ - name: Upload distributions
38
+ uses: actions/upload-artifact@v4
39
+ with:
40
+ name: dist
41
+ path: dist/
42
+ retention-days: 7
43
+
44
+ publish:
45
+ name: Publish to PyPI
46
+ needs: build
47
+ runs-on: ubuntu-latest
48
+ environment:
49
+ name: pypi
50
+ url: https://pypi.org/p/datamasque-cli
51
+ permissions:
52
+ id-token: write
53
+ contents: read
54
+ steps:
55
+ - name: Download distributions
56
+ uses: actions/download-artifact@v4
57
+ with:
58
+ name: dist
59
+ path: dist/
60
+
61
+ - name: Publish to PyPI
62
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,11 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .venv/
7
+ .mypy_cache/
8
+ .pytest_cache/
9
+ .ruff_cache/
10
+ *.egg
11
+ datamasque-logs.tar.gz
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## v1.0.0
4
+
5
+ Initial release.
@@ -0,0 +1,231 @@
1
+ # Contributing
2
+
3
+ Thanks for your interest in contributing to `datamasque-cli`!
4
+ Contributions, bug reports, and feature requests are all welcome.
5
+
6
+ ## Reporting bugs
7
+
8
+ File an issue on the
9
+ [GitHub issue tracker](https://github.com/datamasque/datamasque-cli/issues).
10
+ Please include:
11
+
12
+ - the version of `datamasque-cli` you're using (`dm --version` or `pip show datamasque-cli`);
13
+ - the Python version and operating system;
14
+ - the command you ran (with credentials and other sensitive arguments redacted);
15
+ - the full output, including any traceback.
16
+
17
+ If the bug concerns a specific DataMasque server API response,
18
+ include the status code and (with any sensitive fields redacted) the response body.
19
+
20
+ ## Feature requests
21
+
22
+ Open an issue describing what you'd like to do and why.
23
+ We're particularly interested in feedback on:
24
+
25
+ - command and flag naming;
26
+ - output formats (human-readable tables vs. `--json`);
27
+ - coverage gaps where you've had to fall back to `curl` or the Python client;
28
+ - ergonomics for CI / scripted use.
29
+
30
+ ## Development setup
31
+
32
+ The project uses [uv](https://docs.astral.sh/uv/) for dependency management.
33
+ Install dependencies and set up a virtual environment:
34
+
35
+ ```console
36
+ git clone https://github.com/datamasque/datamasque-cli.git
37
+ cd datamasque-cli
38
+ uv sync
39
+ ```
40
+
41
+ Then either activate the venv (`source .venv/bin/activate`)
42
+ or prefix commands with `uv run`.
43
+
44
+ ## Running the tests
45
+
46
+ ```console
47
+ make test
48
+ ```
49
+
50
+ Unit tests run entirely against mocked clients,
51
+ so no DataMasque server is required.
52
+
53
+ ### Integration tests
54
+
55
+ `tests/integration/` hits a real DataMasque instance to catch the bugs unit tests can't —
56
+ ruleset namespace collisions,
57
+ delete targeting,
58
+ server-state resolution,
59
+ and the full `run start → retry → logs --follow` lifecycle.
60
+ They're excluded from `make test` and run only when you opt in.
61
+
62
+ Point them at a DataMasque you own
63
+ (your local dev instance, a throwaway VM — never a shared/prod instance)
64
+ via env vars:
65
+
66
+ ```console
67
+ export DM_TEST_URL=https://localhost
68
+ export DM_TEST_USERNAME=admin
69
+ export DM_TEST_PASSWORD=secret
70
+ make test-integration
71
+ ```
72
+
73
+ Or skip the typing and source credentials from your active `dm` profile:
74
+
75
+ ```console
76
+ make test-integration-local
77
+ ```
78
+
79
+ Tests create rulesets and connections with uuid-suffixed names (`dm_int_<hex>`)
80
+ and delete them in teardown;
81
+ a crashed run may leave stragglers,
82
+ which `dm rulesets list | grep dm_int_` and `dm connections list | grep dm_int_` will surface.
83
+
84
+ The run-lifecycle tests need a working file-source and file-destination connection on the instance.
85
+ By default they auto-detect the first `MountedShare` pair
86
+ (preferring it over S3/Azure for speed).
87
+ Override with `DM_TEST_SOURCE_CONN` / `DM_TEST_DESTINATION_CONN` env vars
88
+ if auto-detection picks the wrong ones.
89
+ Tests skip cleanly if no pair is available.
90
+
91
+ Run the integration suite before opening an MR that touches server interactions
92
+ (`commands/`, `client.py`).
93
+
94
+ ## Linting and type-checking
95
+
96
+ ```console
97
+ make lint # ruff check
98
+ make format # ruff format + import sorting
99
+ make mypy # strict mypy on src/
100
+ make check # all of the above plus tests
101
+ ```
102
+
103
+ `mypy` runs in strict mode with `disallow_untyped_defs`.
104
+
105
+ ## Code style
106
+
107
+ - **Line length:**
108
+ 120 characters.
109
+ Enforced by `ruff format`.
110
+ - **Comments and docstrings:**
111
+ use [semantic line breaks](https://sembr.org/) —
112
+ break at clause boundaries, not column widths.
113
+ This applies to text files (such as this one) as well as Python source.
114
+ - **Comment content:**
115
+ default to writing no comments;
116
+ add one only when the *why* is non-obvious
117
+ (a hidden constraint, a workaround, a subtle invariant).
118
+ Don't restate what well-named code already says.
119
+ - **Spelling:**
120
+ British English in docs and comments,
121
+ matching the rest of the DataMasque codebase.
122
+ - **Typing:**
123
+ new-style generics (`list[str]`, `dict[str, int]`),
124
+ not `List` / `Dict`.
125
+ - **Imports:**
126
+
127
+ - All imports at the top of the file; no inline imports.
128
+ - Absolute imports only; relative imports are not used.
129
+
130
+ - **Formatting:**
131
+ run `make format` before committing.
132
+
133
+ ## DataMasque conventions
134
+
135
+ A few project-specific conventions on top of the generic style above:
136
+
137
+ - **Function naming:**
138
+ verb-phrase form (`execute_ruleset`, `validate_username`),
139
+ not `ruleset_executor()`.
140
+ - **Boolean naming:**
141
+ prefix with a modal verb — `is_`, `has_`, `can_`, `will_`, `was_` —
142
+ e.g. `is_expired`, `has_validation_errors`, `can_retry`.
143
+ - **Acronym casing:**
144
+ follow normal casing rules; `HttpClient`, not `HTTPClient`.
145
+ The brand `DataMasque` is always spelled out in full.
146
+ - **No `hasattr` / `getattr` / `setattr`:**
147
+ these bypass type checking and hide bugs until runtime.
148
+ If you reach for them, the typing probably needs reshaping —
149
+ a protocol, a union, or a dataclass.
150
+ - **No conditional imports:**
151
+ always import at module top.
152
+ `TYPE_CHECKING` is the only exception, for typing-only imports.
153
+ - **Dataclasses over dicts:**
154
+ use a `@dataclass` (or Pydantic model) when the shape is fixed.
155
+ Reserve `dict` for genuinely dynamic key-value data.
156
+
157
+ ## Pull requests
158
+
159
+ 1. Fork the repository and create a feature branch.
160
+ 2. Add tests for any behavioural change.
161
+ 3. Run `make check` locally before opening the PR.
162
+ 4. Keep commits focused; one logical change per commit is easier to review.
163
+ 5. Open a PR against `main` and describe what the change does and why.
164
+ 6. The maintainers will review and either merge, request changes, or close with an explanation.
165
+
166
+ ## Commit messages
167
+
168
+ Use [Conventional Commits](https://www.conventionalcommits.org/) format where practical:
169
+ `feat: add dm run retry command`,
170
+ `fix: handle 401 retry for multipart uploads`,
171
+ `docs: clarify connections update semantics`,
172
+ and so on.
173
+
174
+ ## Releasing
175
+
176
+ Releases are published automatically by CI when a version tag is pushed.
177
+
178
+ ```console
179
+ make release-patch # 0.1.0 → 0.1.1 — bug fixes
180
+ make release-minor # 0.1.0 → 0.2.0 — new features
181
+ make release-major # 0.1.0 → 1.0.0 — breaking changes
182
+ ```
183
+
184
+ Each target runs `make check`,
185
+ bumps the version in `pyproject.toml`,
186
+ refreshes `uv.lock`,
187
+ commits, tags, and pushes.
188
+ CI handles the publish.
189
+
190
+ To publish manually without bumping:
191
+
192
+ ```console
193
+ make publish
194
+ ```
195
+
196
+ ## Toolchain
197
+
198
+ | Tool | Purpose |
199
+ |---------------------------------------------|----------------------------------|
200
+ | [uv](https://docs.astral.sh/uv/) | Package manager |
201
+ | [ruff](https://docs.astral.sh/ruff/) | Linting + formatting |
202
+ | [mypy](https://mypy-lang.org/) | Type checking (strict mode) |
203
+ | [pytest](https://pytest.org/) | Testing |
204
+ | [Typer](https://typer.tiangolo.com/) | CLI framework |
205
+
206
+ ## Project structure
207
+
208
+ ```
209
+ src/datamasque_cli/
210
+ main.py # Typer app entry point
211
+ client.py # Authenticated client factory
212
+ config.py # Profile management (~/.config/datamasque-cli/)
213
+ output.py # JSON / rich table output formatting
214
+ commands/
215
+ auth.py # login, logout, status, profiles
216
+ connections.py # list, get, create, delete
217
+ rulesets.py # list, get, create, delete, generate, validate
218
+ ruleset_libraries.py # list, get, create, delete, usage
219
+ runs.py # start, status, list, logs, cancel, wait
220
+ users.py # list, create, reset-password
221
+ discovery.py # schema, sdd-report, db-report, file-report
222
+ seeds.py # list, upload, delete
223
+ files.py # list, upload (Snowflake keys, Oracle wallets)
224
+ system.py # health, licence, logs, admin-install
225
+ ```
226
+
227
+ ## License
228
+
229
+ By contributing,
230
+ you agree that your contributions will be licensed under the Apache License 2.0,
231
+ the same license as the rest of the project.
@@ -0,0 +1,201 @@
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 describing the origin of the Work and
141
+ 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 Support. While redistributing the Work or
166
+ Derivative Works thereof, You may choose to offer, and charge a
167
+ fee for, acceptance of support, warranty, indemnity, or other
168
+ liability obligations and/or rights consistent with this License.
169
+ However, in accepting such obligations, You may act only on Your
170
+ own behalf and on Your sole responsibility, not on behalf of any
171
+ other Contributor, and only if You agree to indemnify, defend,
172
+ and hold each Contributor harmless for any liability incurred by,
173
+ or claims asserted against, such Contributor by reason of your
174
+ accepting any such warranty or support.
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 2026 DataMasque Ltd
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
200
+ implied. See the License for the specific language governing
201
+ permissions and limitations under the License.