entropy-data 0.3.23__tar.gz → 0.3.25__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 (109) hide show
  1. {entropy_data-0.3.23 → entropy_data-0.3.25}/.github/workflows/ci.yaml +2 -2
  2. {entropy_data-0.3.23 → entropy_data-0.3.25}/.github/workflows/release.yaml +1 -1
  3. {entropy_data-0.3.23 → entropy_data-0.3.25}/.pre-commit-config.yaml +1 -1
  4. {entropy_data-0.3.23 → entropy_data-0.3.25}/CHANGELOG.md +26 -0
  5. {entropy_data-0.3.23 → entropy_data-0.3.25}/CLAUDE.md +3 -3
  6. {entropy_data-0.3.23 → entropy_data-0.3.25}/Dockerfile +1 -1
  7. {entropy_data-0.3.23 → entropy_data-0.3.25}/PKG-INFO +58 -10
  8. {entropy_data-0.3.23 → entropy_data-0.3.25}/README.md +53 -6
  9. {entropy_data-0.3.23 → entropy_data-0.3.25}/pyproject.toml +5 -4
  10. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/cli.py +45 -15
  11. entropy_data-0.3.25/src/entropy_data/client.py +165 -0
  12. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/api_keys.py +27 -11
  13. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/assets.py +8 -21
  14. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/connection.py +90 -22
  15. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/costs.py +2 -2
  16. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/datacontract_branches.py +7 -30
  17. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/datacontracts.py +4 -9
  18. entropy_data-0.3.25/src/entropy_data/commands/dataproductbuilders.py +79 -0
  19. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/dataproducts.py +4 -34
  20. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/git_credentials.py +1 -9
  21. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/integrations.py +95 -5
  22. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/lineage.py +25 -4
  23. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/notification_channels.py +9 -25
  24. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/organization.py +1 -8
  25. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/semantic_branches.py +7 -32
  26. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/settings.py +87 -65
  27. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/test_results.py +34 -6
  28. entropy_data-0.3.25/src/entropy_data/commands/unity_catalog_metadata.py +215 -0
  29. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/usage.py +22 -4
  30. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/config.py +24 -3
  31. entropy_data-0.3.25/src/entropy_data/listing.py +226 -0
  32. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/output.py +29 -4
  33. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/resources.py +7 -1
  34. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/sync.py +7 -37
  35. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_access_request.py +16 -15
  36. entropy_data-0.3.25/tests/commands/test_api_keys.py +160 -0
  37. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_assets.py +23 -38
  38. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_classifications.py +13 -15
  39. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_connection.py +148 -23
  40. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_connectors.py +11 -13
  41. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_costs.py +11 -10
  42. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_datacontract_branches.py +36 -47
  43. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_datacontracts.py +33 -51
  44. entropy_data-0.3.25/tests/commands/test_dataproduct_types.py +99 -0
  45. entropy_data-0.3.25/tests/commands/test_dataproductbuilders.py +90 -0
  46. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_dataproducts.py +21 -30
  47. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_email_templates.py +13 -15
  48. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_git_credentials.py +24 -46
  49. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_gitconnections.py +30 -54
  50. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_import_export.py +98 -113
  51. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_integrations.py +95 -72
  52. entropy_data-0.3.25/tests/commands/test_lineage.py +167 -0
  53. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_notification_channels.py +12 -18
  54. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_organization.py +28 -40
  55. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_policies.py +12 -20
  56. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_schemas.py +20 -42
  57. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_semantic_branches.py +25 -31
  58. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_semantics.py +35 -42
  59. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_settings.py +24 -41
  60. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_tags.py +14 -17
  61. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_team_roles.py +17 -19
  62. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/test_teams.py +26 -35
  63. entropy_data-0.3.25/tests/commands/test_test_results.py +136 -0
  64. entropy_data-0.3.25/tests/commands/test_unity_catalog_metadata.py +178 -0
  65. entropy_data-0.3.25/tests/commands/test_usage.py +146 -0
  66. entropy_data-0.3.25/tests/test_cli.py +100 -0
  67. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/test_client.py +57 -56
  68. entropy_data-0.3.25/tests/test_listing.py +56 -0
  69. entropy_data-0.3.25/tests/test_timeout.py +82 -0
  70. entropy_data-0.3.23/src/entropy_data/client.py +0 -237
  71. entropy_data-0.3.23/tests/commands/test_api_keys.py +0 -101
  72. entropy_data-0.3.23/tests/commands/test_lineage.py +0 -97
  73. entropy_data-0.3.23/tests/commands/test_test_results.py +0 -76
  74. entropy_data-0.3.23/tests/commands/test_usage.py +0 -74
  75. entropy_data-0.3.23/tests/test_cli.py +0 -43
  76. {entropy_data-0.3.23 → entropy_data-0.3.25}/.dockerignore +0 -0
  77. {entropy_data-0.3.23 → entropy_data-0.3.25}/.editorconfig +0 -0
  78. {entropy_data-0.3.23 → entropy_data-0.3.25}/.github/dependabot.yml +0 -0
  79. {entropy_data-0.3.23 → entropy_data-0.3.25}/.github/pull_request_template.md +0 -0
  80. {entropy_data-0.3.23 → entropy_data-0.3.25}/.github/workflows/dependabot-auto-merge.yaml +0 -0
  81. {entropy_data-0.3.23 → entropy_data-0.3.25}/.gitignore +0 -0
  82. {entropy_data-0.3.23 → entropy_data-0.3.25}/LICENSE +0 -0
  83. {entropy_data-0.3.23 → entropy_data-0.3.25}/docs/apply-command-plan.md +0 -0
  84. {entropy_data-0.3.23 → entropy_data-0.3.25}/release +0 -0
  85. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/__init__.py +0 -0
  86. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/__main__.py +0 -0
  87. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/__init__.py +0 -0
  88. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/access.py +0 -0
  89. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/certifications.py +0 -0
  90. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/classifications.py +0 -0
  91. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/connectors.py +0 -0
  92. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/definitions.py +0 -0
  93. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/events.py +0 -0
  94. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/example_data.py +0 -0
  95. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/gitconnections.py +0 -0
  96. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/import_export.py +0 -0
  97. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/policies.py +0 -0
  98. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/schemas.py +0 -0
  99. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/search.py +0 -0
  100. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/semantics.py +0 -0
  101. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/sourcesystems.py +0 -0
  102. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/sync.py +0 -0
  103. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/tags.py +0 -0
  104. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/commands/teams.py +0 -0
  105. {entropy_data-0.3.23 → entropy_data-0.3.25}/src/entropy_data/util.py +0 -0
  106. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/__init__.py +0 -0
  107. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/commands/__init__.py +0 -0
  108. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/conftest.py +0 -0
  109. {entropy_data-0.3.23 → entropy_data-0.3.25}/tests/test_config.py +0 -0
@@ -26,7 +26,7 @@ jobs:
26
26
  - uses: actions/checkout@v7
27
27
  - name: Install uv
28
28
  # setup-uv no longer publishes floating major tags, so pin the exact version.
29
- uses: astral-sh/setup-uv@v10.0.1
29
+ uses: astral-sh/setup-uv@v10.3.0
30
30
  with:
31
31
  python-version: ${{ matrix.python-version }}
32
32
  - name: Install the project
@@ -46,7 +46,7 @@ jobs:
46
46
  steps:
47
47
  - uses: actions/checkout@v7
48
48
  - name: Install uv
49
- uses: astral-sh/setup-uv@v10.0.1
49
+ uses: astral-sh/setup-uv@v10.3.0
50
50
  with:
51
51
  python-version: ${{ matrix.python-version }}
52
52
  - name: Install the project
@@ -66,7 +66,7 @@ jobs:
66
66
  with:
67
67
  fetch-depth: 0
68
68
  - name: Install uv
69
- uses: astral-sh/setup-uv@v10.0.1
69
+ uses: astral-sh/setup-uv@v10.3.0
70
70
  with:
71
71
  python-version: "3.12"
72
72
  - name: Build package
@@ -1,6 +1,6 @@
1
1
  repos:
2
2
  - repo: https://github.com/astral-sh/ruff-pre-commit
3
- rev: v0.16.6
3
+ rev: v0.17.0
4
4
  hooks:
5
5
  - id: ruff
6
6
  args: [ --fix ]
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ## [0.3.25]
6
+
7
+ - Fix: `connection list` honours `-o json` / `-o yaml`, both as the global option (`entropy-data -o json connection list`) and on the command, and prints every connection with its full name, host, vanity URL and `default` flag. Before, it always printed the table, with long names truncated, so scripts could not read which connection is the default. With `ENTROPY_DATA_API_KEY` or `ENTROPY_DATA_HOST` set, it warns that they override the default connection (marked `* (env)`, and `overridden_by` in JSON/YAML).
8
+ - With `-o json` or `-o yaml`, errors are a structured document on stderr (`{"error": {"type", "message", "status", "url"}}`), so scripts and agents parse failures like results.
9
+ - `connection test` names the organization it reached, the host, and where the API key came from (`--api-key`, `--connection`, `ENTROPY_DATA_API_KEY`, or the default connection), because an environment variable silently overrides the default connection.
10
+ - `connection add --help` says that the added connection becomes the default.
11
+ - `connection add` says when it switches the default connection ("Default connection switched from 'prod' to 'demo'.") and how to switch back with `connection set-default`. Before, the default changed silently, and the next commands went to the new organization.
12
+ - `usage list`, `lineage list` and `test-results list` take `--since`/`--until` (ISO date or date-time, or relative like `7d`), `--page`, `--limit` and `--all` to follow every page, newest first; `test-results list` also takes `--server`. Before, `test-results list` only showed the first 10 results. Server-side filtering needs entropy-data#1784; against an older server the CLI filters itself and warns.
13
+ - `costs add` says what it does: a cost with the same data product, name and month as an existing one replaces it (as the API always did), so it prints "Cost saved." instead of "Cost added.".
14
+ - The CLI now talks to the API through the [entropy-data-sdk](https://pypi.org/project/entropy-data-sdk/) package (httpx) instead of its own requests-based client. Commands behave as before; connection setup failures are retried a few times, and an API host with a path prefix (for example behind a reverse proxy) is kept in every request URL.
15
+ - Fix: a `.env` file in the current working directory is loaded again. The CLI searched for `.env` upward from its installed package instead of from where it runs, so a project's `.env` was ignored when the CLI was installed with `uv tool` or `pip`.
16
+ - Add `entropy-data dataproductbuilders list|get|put|delete` (EXPERIMENTAL) to manage data product builders, the coding agent plugins offered on a data product's Build page. Builders are addressed by a stable external ID (e.g. `dbt`); `put` creates a builder under a new ID and otherwise replaces the whole builder. Wraps `/api/dataproductbuilders` (entropy-data#1776, external IDs from entropy-data#1782).
17
+ - Add `entropy-data settings dataproduct-types get|put` to manage the organization's data product types as one document. `put` replaces the whole list; `behavior` and `builtIn` are read-only, so a `get` written back unchanged is accepted. Wraps `GET`/`PUT /api/settings/dataproduct-types`.
18
+ - `export`, `apply`, `import`, and `sync` handle `dataproduct-types` as an organization-level singleton and `dataproductbuilders`, both applied after `policies` and before the data products that reference the type ids.
19
+ - `entropy-data integrations …` now addresses the asset imports on `/api/integrations/ingest/…`, their new home; the paths without `ingest` stay on the server as deprecated. Requires entropy-data#1763.
20
+ - Add `entropy-data integrations put <externalId> --file <file>` to create or change an asset import from its configuration as `integrations get` prints it (`configuration`, plus `credential` and `enabled`; `--credential-file` and `--enabled/--disabled` override the file), and `entropy-data integrations delete <integration> [--delete-assets]`.
21
+ - Add `entropy-data integrations unity-catalog-metadata` for the integrations that write data contract metadata to Databricks Unity Catalog: `list`, `get`, `put` (from `--name`/`--host`/`--client-id`/`--client-secret`/`--warehouse-id`/`--enabled` or a file), `delete`, `tables` (what was written, `--state`), `queue` (what waits), `retry-failed` and `discard-queue`.
22
+
23
+ ## [0.3.24]
24
+
25
+ - Add the global `--timeout <seconds>` option (or `ENTROPY_DATA_TIMEOUT`) to set how long every API request waits for a response. The default stays 30 seconds, and commands that already wait longer by themselves (`datacontracts test`, `datacontracts generate`) keep doing so unless `--timeout` is given. Replacing a branch with a large semantic ontology can take the server more than 30 seconds.
26
+
3
27
  ## [0.3.23]
4
28
 
5
29
  - Add `entropy-data semantics branches` to work on branches of a semantic namespace: `list`, `create`, `get`, `put` (replace the branch with an OSI ontology YAML document, sent as written), `yaml`, `changes` (what the branch changes against the namespace, one entry per concept), `rebase`, `merge` and `delete`. `merge` lands the branch, or — where the namespace's git branch only takes reviewed changes — prints the pull/merge request opened from it, leaving the branch open. Requires semantic branches on the instance (entropy-data#1665).
@@ -65,6 +89,8 @@
65
89
 
66
90
  - Add `entropy-data integrations runs-get <integration> <run-id>` to fetch a single ingestion run by id. Wraps `GET /api/integrations/{ingestionId}/runs/{ingestionRunId}`, the last documented API endpoint not yet exposed by the CLI. Like the other `integrations` commands, the integration argument accepts an `externalId`, display `name`, or UUID.
67
91
 
92
+ - `entropy-data api-keys create` takes `--permission NAME` (repeatable) to create a key that may write only with those permissions, and `--read-only` for a key that reads what the team sees and changes nothing. Without either, the key carries everything your own key holds on the team, which is what it did before. `--scope` now defaults to `team`. Needs a server that knows the `permissions` field on `POST /api/api-keys`; an older server ignores it and creates the key as before.
93
+
68
94
  ## [0.3.11]
69
95
 
70
96
  - Add `entropy-data integrations list|get|configuration|runs|run|cancel` to manage native data-platform integrations (Snowflake, Databricks, BigQuery, Postgres, MySQL, MariaDB, MSSQL, Glue, Alation, Fabric, Power BI). Wraps the new `/api/integrations` endpoints. Commands accept the integration's `externalId`, display `name`, or UUID; name-to-UUID resolution happens client-side. `integrations run` supports `--wait` to poll the run until it reaches a terminal status (SUCCESS, FAILED, CANCELLED), useful for CI and automation that wants to know the outcome before continuing.
@@ -43,7 +43,7 @@ CLI for Entropy Data.
43
43
  ### Core Modules
44
44
  - `cli.py` — Typer app, global options, command group registration
45
45
  - `config.py` — Connection config management (~/.entropy-data/config.toml)
46
- - `client.py` — HTTP client wrapping requests (generic CRUD + actions)
46
+ - `client.py` — path-and-dict client over the `entropy-data-sdk` package (generic CRUD + actions); `client.sdk` is the typed SDK client, `client.http` its HTTP layer for endpoints without a method
47
47
  - `output.py` — Output formatting (Rich tables, JSON)
48
48
 
49
49
  ### Command Modules (`commands/`)
@@ -57,6 +57,6 @@ Resources: dataproducts, datacontracts, access, teams, sourcesystems, definition
57
57
 
58
58
  ## Code Conventions
59
59
  - Python 3.11+
60
- - Typer for CLI, Rich for output, Pydantic for models, requests for HTTP
60
+ - Typer for CLI, Rich for output, Pydantic for models, `entropy-data-sdk` (httpx) for HTTP
61
61
  - Ruff for linting/formatting (line-length 120)
62
- - Tests use pytest + responses (mocked HTTP)
62
+ - Tests use pytest + respx (mocked HTTP)
@@ -1,7 +1,7 @@
1
1
  # Named stage rather than an inline `COPY --from=ghcr.io/astral-sh/uv:...`:
2
2
  # Dependabot's Docker parser only reads FROM lines, so an inline image
3
3
  # reference is never updated.
4
- FROM ghcr.io/astral-sh/uv:0.12.13 AS uv
4
+ FROM ghcr.io/astral-sh/uv:0.13.1 AS uv
5
5
 
6
6
  FROM python:3.14-slim
7
7
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: entropy-data
3
- Version: 0.3.23
3
+ Version: 0.3.25
4
4
  Summary: CLI for Entropy Data
5
5
  Project-URL: Homepage, https://entropy-data.com
6
6
  Project-URL: Documentation, https://docs.entropy-data.com
@@ -16,19 +16,20 @@ Classifier: Programming Language :: Python :: 3.12
16
16
  Classifier: Programming Language :: Python :: 3.13
17
17
  Classifier: Programming Language :: Python :: 3.14
18
18
  Requires-Python: >=3.11
19
+ Requires-Dist: entropy-data-sdk<0.2,>=0.1.0
19
20
  Requires-Dist: pydantic<3.0,>=2.10
20
21
  Requires-Dist: python-dotenv<2.0,>=1.0
21
22
  Requires-Dist: pyyaml<7.0,>=6.0
22
- Requires-Dist: requests<3.0,>=2.33
23
23
  Requires-Dist: rich<16.0,>=14.0
24
24
  Requires-Dist: tomli-w<2.0,>=1.0
25
25
  Requires-Dist: truststore<1.0,>=0.10
26
26
  Requires-Dist: typer<1.0,>=0.15.0
27
27
  Provides-Extra: dev
28
+ Requires-Dist: httpx>=0.28.1; extra == 'dev'
28
29
  Requires-Dist: pre-commit>=3.7; extra == 'dev'
29
30
  Requires-Dist: pytest>=9.0.3; extra == 'dev'
30
- Requires-Dist: responses>=0.25; extra == 'dev'
31
- Requires-Dist: ruff<0.17,>=0.8; extra == 'dev'
31
+ Requires-Dist: respx>=0.22; extra == 'dev'
32
+ Requires-Dist: ruff<0.18,>=0.8; extra == 'dev'
32
33
  Description-Content-Type: text/markdown
33
34
 
34
35
  # Entropy Data CLI
@@ -83,6 +84,8 @@ entropy-data connection add prod
83
84
  # prompts for API key and host
84
85
  ```
85
86
 
87
+ The added connection becomes the default. Switch with `entropy-data connection set-default <name>`, or pick one per call with `--connection <name>`.
88
+
86
89
  ### 2. Explore your data platform
87
90
 
88
91
  ```bash
@@ -129,10 +132,29 @@ entropy-data semantics branches changes sales add-credit-limit
129
132
  entropy-data semantics branches merge sales add-credit-limit
130
133
  ```
131
134
 
135
+ ### Time ranges and paging for usage, lineage, and test results
136
+
137
+ `usage list`, `lineage list`, and `test-results list` show the newest records first, one page at a time (100 per page, 10 for test results):
138
+
139
+ ```bash
140
+ # Lineage events of the last 24 hours
141
+ entropy-data lineage list --since 24h
142
+
143
+ # Every test run of a contract against production in September
144
+ entropy-data test-results list --data-contract-id orders --server production --since 2026-09-01 --until 2026-10-01 --all
145
+
146
+ # Usage spans in pages of 500
147
+ entropy-data usage list --scope-name usage --limit 500 --page 1
148
+ ```
149
+
150
+ `--since` (inclusive) and `--until` (exclusive) take an ISO date or date-time (UTC unless it has an offset), or a relative time like `30m`, `24h`, `7d`, `2w`. `--all` follows every page. With `-o json`, a note on stderr says when more pages exist.
151
+
152
+ The server applies these filters. A server from before that feature ignores them, so the CLI applies them to what it gets back and says so on stderr.
153
+
132
154
  ## Commands
133
155
 
134
156
  ```
135
- entropy-data [--version] [--connection NAME] [--output table|json|yaml] [--debug]
157
+ entropy-data [--version] [--connection NAME] [--output table|json|yaml] [--debug] [--timeout SECONDS]
136
158
 
137
159
  connection list | get | add | remove | set-default | test
138
160
  dataproducts list | get | put | delete | import-from-git | star | unstar | star-status | stargazers | gitconnection ...
@@ -145,16 +167,17 @@ entropy-data [--version] [--connection NAME] [--output table|json|yaml] [--debug
145
167
  certifications list | get | put | delete
146
168
  classifications list | get | put | delete
147
169
  policies list | get | put | delete
170
+ dataproductbuilders list | get | put | delete
148
171
  example-data list | get | put | delete
149
172
  test-results list | get | publish | delete
150
- costs list | add | delete
173
+ costs list | add (upsert) | delete
151
174
  assets list | get | put | delete | tags ...
152
175
  tags list | get | put | delete
153
176
  api-keys create | delete
154
177
  connectors list | get | put | delete
155
- integrations list | get | runs | runs-get | runs-latest | run | cancel
178
+ integrations list | get | put | delete | runs | runs-get | runs-latest | run | cancel | unity-catalog-metadata ...
156
179
  organization get | members ... | git-credentials ...
157
- settings get-customization | put-customization | get-scim-mapping | put-scim-mapping | team-roles ... | email-templates ...
180
+ settings get-customization | put-customization | get-scim-mapping | put-scim-mapping | team-roles ... | email-templates ... | dataproduct-types ...
158
181
  events poll
159
182
  lineage list | submit | delete
160
183
  schemas get
@@ -180,7 +203,7 @@ idempotent PUT-by-id, so runs converge and are safe to repeat.
180
203
  `sync` copies **nothing by default** — name the resources to sync with `--include`.
181
204
 
182
205
  **Supported resources** (in dependency order): `teams`, `tags`, `definitions`, `policies`,
183
- `sourcesystems`, `certifications`, `classification-schemes`, `assets`, `datacontracts`,
206
+ `dataproduct-types`, `dataproductbuilders`, `sourcesystems`, `certifications`, `classification-schemes`, `assets`, `datacontracts`,
184
207
  `dataproducts`, `example-data`, `access`, `semantic-namespaces`, `semantic-ontology`,
185
208
  `email-templates`, `organization-features`.
186
209
 
@@ -287,7 +310,24 @@ ENTROPY_DATA_HOST=https://api.entropy-data.com
287
310
 
288
311
  Values from `.env` are loaded as environment variables and do **not** override already-set environment variables.
289
312
 
290
- Resolution precedence: CLI options > environment variables / `.env` > config file.
313
+ Resolution precedence: CLI options (`--api-key`, `--host`, `--connection`) > environment variables / `.env` > default connection from the config file.
314
+
315
+ `entropy-data connection list` warns (on stderr) when `ENTROPY_DATA_API_KEY` or `ENTROPY_DATA_HOST` is set, because those override the default connection; in the table the default is marked `* (env)`, and in `-o json` it carries `"overridden_by": [...]`.
316
+
317
+ ### Errors
318
+
319
+ Errors are written to stderr, never stdout, and the CLI exits non-zero (2 for configuration errors, 1 otherwise). With `-o json` or `-o yaml` the error is a structured document, so scripts can parse it:
320
+
321
+ ```json
322
+ {
323
+ "error": {
324
+ "type": "api_error",
325
+ "message": "HTTP 404 from https://api.entropy-data.com/api/teams/missing: Team not found",
326
+ "status": 404,
327
+ "url": "https://api.entropy-data.com/api/teams/missing"
328
+ }
329
+ }
330
+ ```
291
331
 
292
332
  ### TLS behind a corporate proxy or internal CA
293
333
 
@@ -307,6 +347,14 @@ export ENTROPY_DATA_SYSTEM_TRUSTSTORE=1
307
347
 
308
348
  This keeps certificate verification on while trusting the corporate root CA, and applies to every command that makes HTTPS requests.
309
349
 
350
+ ### Timeouts
351
+
352
+ Each API request waits 30 seconds for a response by default (some commands wait longer, e.g. `datacontracts test`). Large documents, such as a semantic ontology with a thousand concepts, can take the server longer. Use the global `--timeout` option, or `ENTROPY_DATA_TIMEOUT`, to wait longer; it applies to every request of the invocation:
353
+
354
+ ```bash
355
+ entropy-data --timeout 120 semantics branches put sales add-credit-limit --file ontology.yaml
356
+ ```
357
+
310
358
  ## Development
311
359
 
312
360
  ```bash
@@ -50,6 +50,8 @@ entropy-data connection add prod
50
50
  # prompts for API key and host
51
51
  ```
52
52
 
53
+ The added connection becomes the default. Switch with `entropy-data connection set-default <name>`, or pick one per call with `--connection <name>`.
54
+
53
55
  ### 2. Explore your data platform
54
56
 
55
57
  ```bash
@@ -96,10 +98,29 @@ entropy-data semantics branches changes sales add-credit-limit
96
98
  entropy-data semantics branches merge sales add-credit-limit
97
99
  ```
98
100
 
101
+ ### Time ranges and paging for usage, lineage, and test results
102
+
103
+ `usage list`, `lineage list`, and `test-results list` show the newest records first, one page at a time (100 per page, 10 for test results):
104
+
105
+ ```bash
106
+ # Lineage events of the last 24 hours
107
+ entropy-data lineage list --since 24h
108
+
109
+ # Every test run of a contract against production in September
110
+ entropy-data test-results list --data-contract-id orders --server production --since 2026-09-01 --until 2026-10-01 --all
111
+
112
+ # Usage spans in pages of 500
113
+ entropy-data usage list --scope-name usage --limit 500 --page 1
114
+ ```
115
+
116
+ `--since` (inclusive) and `--until` (exclusive) take an ISO date or date-time (UTC unless it has an offset), or a relative time like `30m`, `24h`, `7d`, `2w`. `--all` follows every page. With `-o json`, a note on stderr says when more pages exist.
117
+
118
+ The server applies these filters. A server from before that feature ignores them, so the CLI applies them to what it gets back and says so on stderr.
119
+
99
120
  ## Commands
100
121
 
101
122
  ```
102
- entropy-data [--version] [--connection NAME] [--output table|json|yaml] [--debug]
123
+ entropy-data [--version] [--connection NAME] [--output table|json|yaml] [--debug] [--timeout SECONDS]
103
124
 
104
125
  connection list | get | add | remove | set-default | test
105
126
  dataproducts list | get | put | delete | import-from-git | star | unstar | star-status | stargazers | gitconnection ...
@@ -112,16 +133,17 @@ entropy-data [--version] [--connection NAME] [--output table|json|yaml] [--debug
112
133
  certifications list | get | put | delete
113
134
  classifications list | get | put | delete
114
135
  policies list | get | put | delete
136
+ dataproductbuilders list | get | put | delete
115
137
  example-data list | get | put | delete
116
138
  test-results list | get | publish | delete
117
- costs list | add | delete
139
+ costs list | add (upsert) | delete
118
140
  assets list | get | put | delete | tags ...
119
141
  tags list | get | put | delete
120
142
  api-keys create | delete
121
143
  connectors list | get | put | delete
122
- integrations list | get | runs | runs-get | runs-latest | run | cancel
144
+ integrations list | get | put | delete | runs | runs-get | runs-latest | run | cancel | unity-catalog-metadata ...
123
145
  organization get | members ... | git-credentials ...
124
- settings get-customization | put-customization | get-scim-mapping | put-scim-mapping | team-roles ... | email-templates ...
146
+ settings get-customization | put-customization | get-scim-mapping | put-scim-mapping | team-roles ... | email-templates ... | dataproduct-types ...
125
147
  events poll
126
148
  lineage list | submit | delete
127
149
  schemas get
@@ -147,7 +169,7 @@ idempotent PUT-by-id, so runs converge and are safe to repeat.
147
169
  `sync` copies **nothing by default** — name the resources to sync with `--include`.
148
170
 
149
171
  **Supported resources** (in dependency order): `teams`, `tags`, `definitions`, `policies`,
150
- `sourcesystems`, `certifications`, `classification-schemes`, `assets`, `datacontracts`,
172
+ `dataproduct-types`, `dataproductbuilders`, `sourcesystems`, `certifications`, `classification-schemes`, `assets`, `datacontracts`,
151
173
  `dataproducts`, `example-data`, `access`, `semantic-namespaces`, `semantic-ontology`,
152
174
  `email-templates`, `organization-features`.
153
175
 
@@ -254,7 +276,24 @@ ENTROPY_DATA_HOST=https://api.entropy-data.com
254
276
 
255
277
  Values from `.env` are loaded as environment variables and do **not** override already-set environment variables.
256
278
 
257
- Resolution precedence: CLI options > environment variables / `.env` > config file.
279
+ Resolution precedence: CLI options (`--api-key`, `--host`, `--connection`) > environment variables / `.env` > default connection from the config file.
280
+
281
+ `entropy-data connection list` warns (on stderr) when `ENTROPY_DATA_API_KEY` or `ENTROPY_DATA_HOST` is set, because those override the default connection; in the table the default is marked `* (env)`, and in `-o json` it carries `"overridden_by": [...]`.
282
+
283
+ ### Errors
284
+
285
+ Errors are written to stderr, never stdout, and the CLI exits non-zero (2 for configuration errors, 1 otherwise). With `-o json` or `-o yaml` the error is a structured document, so scripts can parse it:
286
+
287
+ ```json
288
+ {
289
+ "error": {
290
+ "type": "api_error",
291
+ "message": "HTTP 404 from https://api.entropy-data.com/api/teams/missing: Team not found",
292
+ "status": 404,
293
+ "url": "https://api.entropy-data.com/api/teams/missing"
294
+ }
295
+ }
296
+ ```
258
297
 
259
298
  ### TLS behind a corporate proxy or internal CA
260
299
 
@@ -274,6 +313,14 @@ export ENTROPY_DATA_SYSTEM_TRUSTSTORE=1
274
313
 
275
314
  This keeps certificate verification on while trusting the corporate root CA, and applies to every command that makes HTTPS requests.
276
315
 
316
+ ### Timeouts
317
+
318
+ Each API request waits 30 seconds for a response by default (some commands wait longer, e.g. `datacontracts test`). Large documents, such as a semantic ontology with a thousand concepts, can take the server longer. Use the global `--timeout` option, or `ENTROPY_DATA_TIMEOUT`, to wait longer; it applies to every request of the invocation:
319
+
320
+ ```bash
321
+ entropy-data --timeout 120 semantics branches put sales add-credit-limit --file ontology.yaml
322
+ ```
323
+
277
324
  ## Development
278
325
 
279
326
  ```bash
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "entropy-data"
3
- version = "0.3.23"
3
+ version = "0.3.25"
4
4
  description = "CLI for Entropy Data"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -28,11 +28,11 @@ dependencies = [
28
28
  "typer>=0.15.0,<1.0",
29
29
  "rich>=14.0,<16.0",
30
30
  "pydantic>=2.10,<3.0",
31
- "requests>=2.33,<3.0",
32
31
  "tomli_w>=1.0,<2.0",
33
32
  "pyyaml>=6.0,<7.0",
34
33
  "python-dotenv>=1.0,<2.0",
35
34
  "truststore>=0.10,<1.0",
35
+ "entropy-data-sdk>=0.1.0,<0.2",
36
36
  ]
37
37
 
38
38
  [project.urls]
@@ -48,12 +48,13 @@ entropy-data = "entropy_data.cli:app"
48
48
  [project.optional-dependencies]
49
49
  dev = [
50
50
  "pytest>=9.0.3",
51
- "responses>=0.25",
52
51
  # 0.16 is allowed: its formatter style is applied to the tree, and the
53
52
  # lint rules it would otherwise widen are stated explicitly under
54
53
  # [tool.ruff.lint].
55
- "ruff>=0.8,<0.17",
54
+ "ruff>=0.8,<0.18",
56
55
  "pre-commit>=3.7",
56
+ "respx>=0.22",
57
+ "httpx>=0.28.1",
57
58
  ]
58
59
 
59
60
  [build-system]
@@ -5,13 +5,13 @@ import sys
5
5
  from typing import Annotated, Optional
6
6
 
7
7
  import typer
8
- from dotenv import load_dotenv
8
+ from dotenv import find_dotenv, load_dotenv
9
9
  from rich.console import Console
10
10
 
11
11
  from entropy_data import __version__
12
12
  from entropy_data.client import ApiError, EntropyDataClient
13
13
  from entropy_data.config import ConfigurationError, resolve_connection
14
- from entropy_data.output import OutputFormat
14
+ from entropy_data.output import OutputFormat, print_data
15
15
 
16
16
  # Global state shared across commands
17
17
  _connection_name: str | None = None
@@ -19,6 +19,7 @@ _cli_api_key: str | None = None
19
19
  _cli_host: str | None = None
20
20
  _output_format: OutputFormat = OutputFormat.table
21
21
  _debug: bool = False
22
+ _timeout: int | None = None
22
23
 
23
24
  error_console = Console(stderr=True)
24
25
 
@@ -30,7 +31,7 @@ def get_client() -> EntropyDataClient:
30
31
  cli_api_key=_cli_api_key,
31
32
  cli_host=_cli_host,
32
33
  )
33
- return EntropyDataClient(config)
34
+ return EntropyDataClient(config, timeout=_timeout)
34
35
 
35
36
 
36
37
  def client_for_connection(name: str) -> EntropyDataClient:
@@ -40,7 +41,7 @@ def client_for_connection(name: str) -> EntropyDataClient:
40
41
  target the primary connection and must not bleed into a second endpoint.
41
42
  """
42
43
  config = resolve_connection(connection_name=name)
43
- return EntropyDataClient(config)
44
+ return EntropyDataClient(config, timeout=_timeout)
44
45
 
45
46
 
46
47
  def get_output_format() -> OutputFormat:
@@ -48,17 +49,28 @@ def get_output_format() -> OutputFormat:
48
49
 
49
50
 
50
51
  def handle_error(e: Exception) -> None:
51
- """Handle errors with appropriate output and exit codes."""
52
+ """Handle errors with appropriate output and exit codes.
53
+
54
+ Errors always go to stderr. With -o json/yaml they are written as a structured
55
+ document, so scripts and agents can parse failures the same way as results.
56
+ """
52
57
  if _debug:
53
58
  raise e
54
59
  if isinstance(e, ConfigurationError):
55
- error_console.print(f"[red]Configuration error: {e}[/red]")
56
- raise SystemExit(2)
57
- if isinstance(e, ApiError):
58
- error_console.print(f"[red]API error: {e}[/red]")
59
- raise SystemExit(1)
60
- error_console.print(f"[red]Error: {e}[/red]")
61
- raise SystemExit(1)
60
+ kind, label, exit_code = "configuration_error", "Configuration error", 2
61
+ elif isinstance(e, ApiError):
62
+ kind, label, exit_code = "api_error", "API error", 1
63
+ else:
64
+ kind, label, exit_code = "error", "Error", 1
65
+ if _output_format != OutputFormat.table:
66
+ error: dict = {"type": kind, "message": str(e)}
67
+ if isinstance(e, ApiError):
68
+ error["status"] = e.status_code
69
+ error["url"] = e.url
70
+ print_data({"error": error}, _output_format, stream=sys.stderr)
71
+ else:
72
+ error_console.print(f"[red]{label}: {e}[/red]", highlight=False, soft_wrap=True)
73
+ raise SystemExit(exit_code)
62
74
 
63
75
 
64
76
  def version_callback(value: bool) -> None:
@@ -71,7 +83,7 @@ def inject_system_truststore() -> None:
71
83
  """Verify TLS using the operating system's certificate trust store instead of the
72
84
  bundled CA certificates. This lets the CLI work behind corporate proxies or with
73
85
  internal CAs whose root certificates are installed in the OS trust store but not in
74
- the certifi bundle that requests uses by default."""
86
+ the certifi bundle that httpx uses by default."""
75
87
  try:
76
88
  import truststore
77
89
  except ImportError:
@@ -99,6 +111,16 @@ def main(
99
111
  host: Annotated[Optional[str], typer.Option("--host", help="API host URL (overrides config and env).")] = None,
100
112
  output: Annotated[OutputFormat, typer.Option("--output", "-o", help="Output format.")] = OutputFormat.table,
101
113
  debug: Annotated[bool, typer.Option("--debug", help="Enable debug output.")] = False,
114
+ timeout: Annotated[
115
+ Optional[int],
116
+ typer.Option(
117
+ "--timeout",
118
+ min=1,
119
+ help="Seconds to wait for each API response (default 30, or longer where a command needs it, "
120
+ "e.g. datacontracts test). Raise it for large documents such as a whole semantic ontology.",
121
+ envvar="ENTROPY_DATA_TIMEOUT",
122
+ ),
123
+ ] = None,
102
124
  system_truststore: Annotated[
103
125
  bool,
104
126
  typer.Option(
@@ -110,13 +132,15 @@ def main(
110
132
  ] = False,
111
133
  ) -> None:
112
134
  """Entropy Data CLI — manage your data platform from the command line."""
113
- global _connection_name, _cli_api_key, _cli_host, _output_format, _debug
114
- load_dotenv()
135
+ global _connection_name, _cli_api_key, _cli_host, _output_format, _debug, _timeout
136
+ # usecwd: find the .env where the user runs the CLI, not next to the installed package.
137
+ load_dotenv(find_dotenv(usecwd=True))
115
138
  _connection_name = connection
116
139
  _cli_api_key = api_key
117
140
  _cli_host = host
118
141
  _output_format = output
119
142
  _debug = debug
143
+ _timeout = timeout
120
144
  if debug:
121
145
  logging.basicConfig(level=logging.DEBUG, stream=sys.stderr)
122
146
  if system_truststore:
@@ -133,6 +157,7 @@ from entropy_data.commands.connection import connection_app # noqa: E402
133
157
  from entropy_data.commands.connectors import connectors_app # noqa: E402
134
158
  from entropy_data.commands.costs import costs_app # noqa: E402
135
159
  from entropy_data.commands.datacontracts import datacontracts_app # noqa: E402
160
+ from entropy_data.commands.dataproductbuilders import dataproductbuilders_app # noqa: E402
136
161
  from entropy_data.commands.dataproducts import dataproducts_app # noqa: E402
137
162
  from entropy_data.commands.definitions import definitions_app # noqa: E402
138
163
  from entropy_data.commands.events import events_app # noqa: E402
@@ -163,6 +188,11 @@ app.add_typer(definitions_app, name="definitions", help="Manage definitions.")
163
188
  app.add_typer(certifications_app, name="certifications", help="Manage certifications.")
164
189
  app.add_typer(classifications_app, name="classifications", help="Manage classification schemes.")
165
190
  app.add_typer(policies_app, name="policies", help="Manage policies.")
191
+ app.add_typer(
192
+ dataproductbuilders_app,
193
+ name="dataproductbuilders",
194
+ help="EXPERIMENTAL Manage data product builders.",
195
+ )
166
196
  app.add_typer(example_data_app, name="example-data", help="Manage example data.")
167
197
  app.add_typer(test_results_app, name="test-results", help="Manage test results.")
168
198
  app.add_typer(costs_app, name="costs", help="Manage costs.")