das-cli 1.5.27__tar.gz → 1.5.71__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.
- {das_cli-1.5.27/das_cli.egg-info → das_cli-1.5.71}/PKG-INFO +61 -4
- {das_cli-1.5.27 → das_cli-1.5.71}/README.md +1376 -1319
- {das_cli-1.5.27 → das_cli-1.5.71}/das/authentication/auth.py +23 -5
- {das_cli-1.5.27 → das_cli-1.5.71}/das/cli.py +1702 -1643
- das_cli-1.5.71/das/common/api.py +177 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/common/config.py +188 -2
- {das_cli-1.5.27 → das_cli-1.5.71}/das/common/enums.py +14 -0
- das_cli-1.5.71/das/common/errors.py +93 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/managers/entries_manager.py +78 -21
- {das_cli-1.5.27 → das_cli-1.5.71}/das/managers/search_manager.py +30 -6
- {das_cli-1.5.27 → das_cli-1.5.71}/das/services/attributes.py +4 -3
- {das_cli-1.5.27 → das_cli-1.5.71}/das/services/cache.py +4 -3
- {das_cli-1.5.27 → das_cli-1.5.71}/das/services/das_elastic_search.py +2 -5
- {das_cli-1.5.27 → das_cli-1.5.71}/das/services/digital_objects.py +3 -2
- {das_cli-1.5.27 → das_cli-1.5.71}/das/services/downloads.py +65 -67
- {das_cli-1.5.27 → das_cli-1.5.71}/das/services/entries.py +2 -9
- {das_cli-1.5.27 → das_cli-1.5.71}/das/services/entry_fields.py +2 -5
- {das_cli-1.5.27 → das_cli-1.5.71}/das/services/hangfire.py +2 -1
- {das_cli-1.5.27 → das_cli-1.5.71}/das/services/search.py +2 -4
- {das_cli-1.5.27 → das_cli-1.5.71}/das/services/users.py +2 -1
- {das_cli-1.5.27 → das_cli-1.5.71/das_cli.egg-info}/PKG-INFO +61 -4
- {das_cli-1.5.27 → das_cli-1.5.71}/das_cli.egg-info/SOURCES.txt +2 -10
- {das_cli-1.5.27 → das_cli-1.5.71}/pyproject.toml +1 -1
- das_cli-1.5.27/das/common/api.py +0 -120
- das_cli-1.5.27/tests/__init__.py +0 -3
- das_cli-1.5.27/tests/attributes_test.py +0 -77
- das_cli-1.5.27/tests/download_manager_test.py +0 -34
- das_cli-1.5.27/tests/entries_manager_test.py +0 -511
- das_cli-1.5.27/tests/entries_service_test.py +0 -270
- das_cli-1.5.27/tests/entries_test.py +0 -43
- das_cli-1.5.27/tests/file_utils_test.py +0 -115
- das_cli-1.5.27/tests/run_tests.py +0 -18
- das_cli-1.5.27/tests/search_manager_test.py +0 -74
- {das_cli-1.5.27 → das_cli-1.5.71}/LICENSE +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/MANIFEST.in +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/__init__.py +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/ai/plugins/dasai.py +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/ai/plugins/entries/entries_plugin.py +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/app.py +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/authentication/oauth.py +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/authentication/secure_input.py +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/common/entry_fields_constants.py +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/common/file_utils.py +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/managers/__init__.py +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/managers/digital_objects_manager.py +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/managers/download_manager.py +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das/services/service_base.py +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das_cli.egg-info/dependency_links.txt +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das_cli.egg-info/entry_points.txt +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das_cli.egg-info/requires.txt +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/das_cli.egg-info/top_level.txt +0 -0
- {das_cli-1.5.27 → das_cli-1.5.71}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: das-cli
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.71
|
|
4
4
|
Summary: DAS api client.
|
|
5
5
|
Author: Royal Netherlands Institute for Sea Research
|
|
6
6
|
License-Expression: MIT
|
|
@@ -138,14 +138,17 @@ das config show
|
|
|
138
138
|
|
|
139
139
|
```bash
|
|
140
140
|
das search entries --attribute <AttributeName> --query '<SearchQuery>' \
|
|
141
|
-
--max-results 10 --page 1 --sort-
|
|
141
|
+
--max-results 10 --page 1 --sort-order asc --format table
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
Options:
|
|
145
145
|
|
|
146
146
|
- `--max-results <n>`: Maximum results per page (default: 10)
|
|
147
147
|
- `--page <num>`: Page number (default: 1)
|
|
148
|
-
- `--sort-by <field>`: Field to sort by
|
|
148
|
+
- `--sort-by <field>`: Field to sort by. Defaults to none, letting the server
|
|
149
|
+
decide the order. Not every attribute has a `Name` field (e.g. `Cruise`), so
|
|
150
|
+
passing a field that does not exist returns a clear error listing the valid
|
|
151
|
+
fields instead of failing.
|
|
149
152
|
- `--sort-order <order>`: `asc` or `desc` (default: asc)
|
|
150
153
|
- `--format <format>`: `table`, `json`, or `compact` (default: table)
|
|
151
154
|
- `--raw`: Print raw API response
|
|
@@ -321,13 +324,42 @@ das config ssl-verify false
|
|
|
321
324
|
# Show current SSL verification status
|
|
322
325
|
das config ssl-status
|
|
323
326
|
|
|
324
|
-
#
|
|
327
|
+
# Set the diagnostic log level (TRACE, DEBUG, INFO, WARN, ERROR, FATAL)
|
|
328
|
+
das config log-level DEBUG
|
|
329
|
+
|
|
330
|
+
# Write logs to a file (in addition to the console)
|
|
331
|
+
das config log-file C:\logs\das.log
|
|
332
|
+
|
|
333
|
+
# Log to the console only again
|
|
334
|
+
das config log-file --clear
|
|
335
|
+
|
|
336
|
+
# Show all current persistent settings (API URL, auth type, token, SSL, logging, OAuth, OpenAI)
|
|
325
337
|
das config show
|
|
326
338
|
|
|
327
339
|
# Reset all configuration (clears credentials and settings)
|
|
328
340
|
das config reset --force
|
|
329
341
|
```
|
|
330
342
|
|
|
343
|
+
#### Logging
|
|
344
|
+
|
|
345
|
+
The CLI logs diagnostic information (HTTP requests and error details) through the
|
|
346
|
+
`das` logger. Control how much is shown and where it goes:
|
|
347
|
+
|
|
348
|
+
- **Level** — from most to least verbose: `TRACE`, `DEBUG`, `INFO`, `WARN`
|
|
349
|
+
(default), `ERROR`, `FATAL`. Set with `das config log-level <LEVEL>` or the
|
|
350
|
+
`DAS_LOG_LEVEL` environment variable.
|
|
351
|
+
- **Destination** — by default logs go to the console only. Point them at a file
|
|
352
|
+
with `das config log-file <path>` (parent folders are created automatically)
|
|
353
|
+
or the `DAS_LOG_FILE` environment variable. The file log includes timestamps
|
|
354
|
+
and logger names; the console stays terse.
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
# Verbose troubleshooting session written to a file
|
|
358
|
+
das config log-level DEBUG
|
|
359
|
+
das config log-file C:\logs\das.log
|
|
360
|
+
das search entries --attribute Cruise --query "cruisecode(*64PE*)"
|
|
361
|
+
```
|
|
362
|
+
|
|
331
363
|
### AI
|
|
332
364
|
|
|
333
365
|
```bash
|
|
@@ -1143,6 +1175,14 @@ DAS_API_KEY=
|
|
|
1143
1175
|
# Enable or disable SSL certificate verification (True/False). Overrides `das config ssl-verify`.
|
|
1144
1176
|
VERIFY_SSL=True
|
|
1145
1177
|
|
|
1178
|
+
# ── Logging ────────────────────────────────────────────────────────────────────
|
|
1179
|
+
|
|
1180
|
+
# Diagnostic log level: TRACE, DEBUG, INFO, WARN, ERROR, FATAL. Overrides `das config log-level`.
|
|
1181
|
+
DAS_LOG_LEVEL=WARN
|
|
1182
|
+
|
|
1183
|
+
# Optional path to write logs to a file. Overrides `das config log-file`.
|
|
1184
|
+
DAS_LOG_FILE=
|
|
1185
|
+
|
|
1146
1186
|
# ── Test / script credentials (basic auth) ─────────────────────────────────────
|
|
1147
1187
|
|
|
1148
1188
|
# Used by tests and scripts when authenticating with username/password.
|
|
@@ -1170,6 +1210,8 @@ TWINE_PASSWORD=
|
|
|
1170
1210
|
| `DAS_API_URL` | Library, CLI | DAS API base URL. Takes priority over the URL stored via `das login`. Example: `https://api.das-dev.nioz.nl`. |
|
|
1171
1211
|
| `DAS_API_KEY` | Library, CLI | DAS API key for authentication. Takes priority over any key stored via `das login --api-key`. Generate in the DAS web UI under **My Settings → API Keys**. Sent as `X-Api-Key` header on every request. |
|
|
1172
1212
|
| `VERIFY_SSL` | Library, CLI | `True` or `False`. Overrides the value set by `das config ssl-verify`. |
|
|
1213
|
+
| `DAS_LOG_LEVEL` | Library, CLI | Diagnostic log level: `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL`. Overrides `das config log-level`. |
|
|
1214
|
+
| `DAS_LOG_FILE` | Library, CLI | Path to write logs to (in addition to the console). Overrides `das config log-file`. |
|
|
1173
1215
|
| `API_URL` | Tests | DAS API base URL used by the test suite. Equivalent to `DAS_API_URL` but only read by tests. |
|
|
1174
1216
|
| `USER_NAME` | Tests | DAS username for test authentication. Never commit to version control. |
|
|
1175
1217
|
| `USER_PASSWORD` | Tests | DAS password for test authentication. Never commit to version control. |
|
|
@@ -1274,9 +1316,24 @@ das config reset --force
|
|
|
1274
1316
|
- Authentication failed:
|
|
1275
1317
|
- Ensure `--api-url` points to the correct DAS instance base URL (often ends with `/api`).
|
|
1276
1318
|
- Try re-running `das login` without passing password to be prompted.
|
|
1319
|
+
- The CLI now reports the actual cause — a wrong password shows the API's
|
|
1320
|
+
message, while an untrusted certificate or unreachable host is reported
|
|
1321
|
+
distinctly (see below).
|
|
1277
1322
|
- SSL certificate errors:
|
|
1323
|
+
- If the host uses a self-signed or otherwise untrusted certificate, the CLI
|
|
1324
|
+
says so explicitly and suggests the fix rather than reporting a generic
|
|
1325
|
+
"authentication failed".
|
|
1278
1326
|
- Use `das config ssl-verify false` temporarily in non-production environments.
|
|
1279
1327
|
- Consider configuring your corporate CA store instead of disabling verification.
|
|
1328
|
+
- Getting more detail on an error:
|
|
1329
|
+
- Error messages include the HTTP status and the message returned by the API
|
|
1330
|
+
(e.g. `HTTP 400: <reason>`) instead of a raw stack trace.
|
|
1331
|
+
- Run with a more verbose log level for full request diagnostics:
|
|
1332
|
+
`das config log-level DEBUG`, optionally with `das config log-file <path>`.
|
|
1333
|
+
- Search errors:
|
|
1334
|
+
- Sorting by a field that does not exist for the chosen attribute returns a
|
|
1335
|
+
clear error listing the available fields. Omit `--sort-by` to let the server
|
|
1336
|
+
choose the order (the default).
|
|
1280
1337
|
- Proxy/network issues:
|
|
1281
1338
|
- Respect environment variables `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` if required.
|
|
1282
1339
|
- Windows PowerShell quoting:
|