das-cli 1.2.24__tar.gz → 1.2.26__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.2.24/das_cli.egg-info → das_cli-1.2.26}/PKG-INFO +85 -1
- {das_cli-1.2.24 → das_cli-1.2.26}/README.md +84 -0
- {das_cli-1.2.24 → das_cli-1.2.26/das_cli.egg-info}/PKG-INFO +85 -1
- {das_cli-1.2.24 → das_cli-1.2.26}/pyproject.toml +1 -1
- {das_cli-1.2.24 → das_cli-1.2.26}/LICENSE +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/MANIFEST.in +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/__init__.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/ai/plugins/dasai.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/ai/plugins/entries/entries_plugin.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/app.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/authentication/auth.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/authentication/secure_input.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/cli.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/common/api.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/common/config.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/common/entry_fields_constants.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/common/enums.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/common/file_utils.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/managers/__init__.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/managers/digital_objects_manager.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/managers/download_manager.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/managers/entries_manager.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/managers/search_manager.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/services/attributes.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/services/cache.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/services/digital_objects.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/services/downloads.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/services/entries.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/services/entry_fields.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/services/hangfire.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/services/search.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das/services/users.py +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das_cli.egg-info/SOURCES.txt +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das_cli.egg-info/dependency_links.txt +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das_cli.egg-info/entry_points.txt +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das_cli.egg-info/requires.txt +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/das_cli.egg-info/top_level.txt +0 -0
- {das_cli-1.2.24 → das_cli-1.2.26}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: das-cli
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.26
|
|
4
4
|
Summary: DAS api client.
|
|
5
5
|
Author: Royal Netherlands Institute for Sea Research
|
|
6
6
|
License-Expression: MIT
|
|
@@ -74,6 +74,14 @@ cd das-cli
|
|
|
74
74
|
pip install -e .
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
+
### Upgrade
|
|
78
|
+
|
|
79
|
+
To upgrade to the latest version of das-cli:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pip install --upgrade das-cli
|
|
83
|
+
```
|
|
84
|
+
|
|
77
85
|
## CLI Usage
|
|
78
86
|
|
|
79
87
|
The package installs a `das` executable for interacting with the DAS API.
|
|
@@ -261,6 +269,41 @@ das ai logout [--force]
|
|
|
261
269
|
|
|
262
270
|
The DAS CLI provides three layers of interaction: CLI commands, Manager layer, and Service layer. Below are examples for each command showing usage at all three layers.
|
|
263
271
|
|
|
272
|
+
### Login
|
|
273
|
+
|
|
274
|
+
Before using the Python API (e.g. `EntryManager`, `SearchManager`, `DownloadManager`), you must authenticate. The managers read the API URL and token from the stored configuration.
|
|
275
|
+
|
|
276
|
+
**Option 1 – Login via CLI first (recommended):**
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
das login --api-url https://your-das-instance/api --username your_username --password your_password
|
|
280
|
+
# Or omit --username/--password to be prompted securely
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Then in Python:
|
|
284
|
+
|
|
285
|
+
```python
|
|
286
|
+
from das.managers.entries_manager import EntryManager
|
|
287
|
+
|
|
288
|
+
entry_manager = EntryManager()
|
|
289
|
+
entry = entry_manager.get(code="7b.b.4c")
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**Option 2 – Login programmatically with `Das`:**
|
|
293
|
+
|
|
294
|
+
```python
|
|
295
|
+
from das.app import Das
|
|
296
|
+
from das.managers.entries_manager import EntryManager
|
|
297
|
+
|
|
298
|
+
# Authenticate and store credentials
|
|
299
|
+
client = Das("https://your-das-instance/api")
|
|
300
|
+
client.authenticate("your_username", "your_password")
|
|
301
|
+
|
|
302
|
+
# Now EntryManager (and other managers) can use the stored config
|
|
303
|
+
entry_manager = EntryManager()
|
|
304
|
+
entry = entry_manager.get(code="7b.b.4c")
|
|
305
|
+
```
|
|
306
|
+
|
|
264
307
|
### Entries
|
|
265
308
|
|
|
266
309
|
#### Get Entry
|
|
@@ -960,6 +1003,47 @@ das config ssl-verify false
|
|
|
960
1003
|
das config ssl-status
|
|
961
1004
|
```
|
|
962
1005
|
|
|
1006
|
+
### Environment variables
|
|
1007
|
+
|
|
1008
|
+
You can use a `.env` file in the project root (or current directory) for local configuration. Copy `.env.example` to `.env` and fill in the values:
|
|
1009
|
+
|
|
1010
|
+
```bash
|
|
1011
|
+
cp .env.example .env
|
|
1012
|
+
```
|
|
1013
|
+
|
|
1014
|
+
Example `.env` (based on `.env.example`):
|
|
1015
|
+
|
|
1016
|
+
```env
|
|
1017
|
+
# DAS API credentials (used by tests and scripts; CLI uses `das login` for interactive use)
|
|
1018
|
+
USER_NAME=
|
|
1019
|
+
USER_PASSWORD=
|
|
1020
|
+
|
|
1021
|
+
# DAS API base URL (e.g. https://api.das-dev.nioz.nl or https://localhost:44301)
|
|
1022
|
+
API_URL=
|
|
1023
|
+
|
|
1024
|
+
# PyPI/Twine credentials for publishing packages (deploy.ps1, etc.)
|
|
1025
|
+
TWINE_USERNAME=__token__
|
|
1026
|
+
TWINE_PASSWORD=
|
|
1027
|
+
|
|
1028
|
+
# Enable or disable SSL certificate verification (True/False). Overrides config when set.
|
|
1029
|
+
VERIFY_SSL=
|
|
1030
|
+
|
|
1031
|
+
# OpenAI model ID for the AI feature (e.g. gpt-4, gpt-4o-mini). Used by `das ai enable`.
|
|
1032
|
+
OPEN_AI_MODEL_ID=
|
|
1033
|
+
```
|
|
1034
|
+
|
|
1035
|
+
| Variable | Description |
|
|
1036
|
+
|----------|-------------|
|
|
1037
|
+
| `USER_NAME` | DAS username. Used by tests and scripts for authentication. The CLI typically uses `das login` instead. |
|
|
1038
|
+
| `USER_PASSWORD` | DAS password. Used by tests and scripts. Never commit this to version control. |
|
|
1039
|
+
| `API_URL` | DAS API base URL (e.g. `https://api.das-dev.nioz.nl` or `https://localhost:44301`). Used by tests, scripts, and when no URL is stored via `das login`. |
|
|
1040
|
+
| `TWINE_USERNAME` | PyPI/Twine username. Use `__token__` when publishing with an API token. |
|
|
1041
|
+
| `TWINE_PASSWORD` | PyPI/Twine password or API token. Used by `deploy.ps1` when publishing packages. |
|
|
1042
|
+
| `VERIFY_SSL` | Set to `True` or `False` to control SSL certificate verification. Overrides the value from `das config ssl-verify` when set. |
|
|
1043
|
+
| `OPEN_AI_MODEL_ID` | OpenAI model ID (e.g. `gpt-4`, `gpt-4o-mini`). Used by the AI feature (`das ai enable`). |
|
|
1044
|
+
|
|
1045
|
+
**Note:** The `.env` file is gitignored. Do not commit credentials.
|
|
1046
|
+
|
|
963
1047
|
## Downloads
|
|
964
1048
|
|
|
965
1049
|
```bash
|
|
@@ -51,6 +51,14 @@ cd das-cli
|
|
|
51
51
|
pip install -e .
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
### Upgrade
|
|
55
|
+
|
|
56
|
+
To upgrade to the latest version of das-cli:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install --upgrade das-cli
|
|
60
|
+
```
|
|
61
|
+
|
|
54
62
|
## CLI Usage
|
|
55
63
|
|
|
56
64
|
The package installs a `das` executable for interacting with the DAS API.
|
|
@@ -238,6 +246,41 @@ das ai logout [--force]
|
|
|
238
246
|
|
|
239
247
|
The DAS CLI provides three layers of interaction: CLI commands, Manager layer, and Service layer. Below are examples for each command showing usage at all three layers.
|
|
240
248
|
|
|
249
|
+
### Login
|
|
250
|
+
|
|
251
|
+
Before using the Python API (e.g. `EntryManager`, `SearchManager`, `DownloadManager`), you must authenticate. The managers read the API URL and token from the stored configuration.
|
|
252
|
+
|
|
253
|
+
**Option 1 – Login via CLI first (recommended):**
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
das login --api-url https://your-das-instance/api --username your_username --password your_password
|
|
257
|
+
# Or omit --username/--password to be prompted securely
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Then in Python:
|
|
261
|
+
|
|
262
|
+
```python
|
|
263
|
+
from das.managers.entries_manager import EntryManager
|
|
264
|
+
|
|
265
|
+
entry_manager = EntryManager()
|
|
266
|
+
entry = entry_manager.get(code="7b.b.4c")
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**Option 2 – Login programmatically with `Das`:**
|
|
270
|
+
|
|
271
|
+
```python
|
|
272
|
+
from das.app import Das
|
|
273
|
+
from das.managers.entries_manager import EntryManager
|
|
274
|
+
|
|
275
|
+
# Authenticate and store credentials
|
|
276
|
+
client = Das("https://your-das-instance/api")
|
|
277
|
+
client.authenticate("your_username", "your_password")
|
|
278
|
+
|
|
279
|
+
# Now EntryManager (and other managers) can use the stored config
|
|
280
|
+
entry_manager = EntryManager()
|
|
281
|
+
entry = entry_manager.get(code="7b.b.4c")
|
|
282
|
+
```
|
|
283
|
+
|
|
241
284
|
### Entries
|
|
242
285
|
|
|
243
286
|
#### Get Entry
|
|
@@ -937,6 +980,47 @@ das config ssl-verify false
|
|
|
937
980
|
das config ssl-status
|
|
938
981
|
```
|
|
939
982
|
|
|
983
|
+
### Environment variables
|
|
984
|
+
|
|
985
|
+
You can use a `.env` file in the project root (or current directory) for local configuration. Copy `.env.example` to `.env` and fill in the values:
|
|
986
|
+
|
|
987
|
+
```bash
|
|
988
|
+
cp .env.example .env
|
|
989
|
+
```
|
|
990
|
+
|
|
991
|
+
Example `.env` (based on `.env.example`):
|
|
992
|
+
|
|
993
|
+
```env
|
|
994
|
+
# DAS API credentials (used by tests and scripts; CLI uses `das login` for interactive use)
|
|
995
|
+
USER_NAME=
|
|
996
|
+
USER_PASSWORD=
|
|
997
|
+
|
|
998
|
+
# DAS API base URL (e.g. https://api.das-dev.nioz.nl or https://localhost:44301)
|
|
999
|
+
API_URL=
|
|
1000
|
+
|
|
1001
|
+
# PyPI/Twine credentials for publishing packages (deploy.ps1, etc.)
|
|
1002
|
+
TWINE_USERNAME=__token__
|
|
1003
|
+
TWINE_PASSWORD=
|
|
1004
|
+
|
|
1005
|
+
# Enable or disable SSL certificate verification (True/False). Overrides config when set.
|
|
1006
|
+
VERIFY_SSL=
|
|
1007
|
+
|
|
1008
|
+
# OpenAI model ID for the AI feature (e.g. gpt-4, gpt-4o-mini). Used by `das ai enable`.
|
|
1009
|
+
OPEN_AI_MODEL_ID=
|
|
1010
|
+
```
|
|
1011
|
+
|
|
1012
|
+
| Variable | Description |
|
|
1013
|
+
|----------|-------------|
|
|
1014
|
+
| `USER_NAME` | DAS username. Used by tests and scripts for authentication. The CLI typically uses `das login` instead. |
|
|
1015
|
+
| `USER_PASSWORD` | DAS password. Used by tests and scripts. Never commit this to version control. |
|
|
1016
|
+
| `API_URL` | DAS API base URL (e.g. `https://api.das-dev.nioz.nl` or `https://localhost:44301`). Used by tests, scripts, and when no URL is stored via `das login`. |
|
|
1017
|
+
| `TWINE_USERNAME` | PyPI/Twine username. Use `__token__` when publishing with an API token. |
|
|
1018
|
+
| `TWINE_PASSWORD` | PyPI/Twine password or API token. Used by `deploy.ps1` when publishing packages. |
|
|
1019
|
+
| `VERIFY_SSL` | Set to `True` or `False` to control SSL certificate verification. Overrides the value from `das config ssl-verify` when set. |
|
|
1020
|
+
| `OPEN_AI_MODEL_ID` | OpenAI model ID (e.g. `gpt-4`, `gpt-4o-mini`). Used by the AI feature (`das ai enable`). |
|
|
1021
|
+
|
|
1022
|
+
**Note:** The `.env` file is gitignored. Do not commit credentials.
|
|
1023
|
+
|
|
940
1024
|
## Downloads
|
|
941
1025
|
|
|
942
1026
|
```bash
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: das-cli
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.26
|
|
4
4
|
Summary: DAS api client.
|
|
5
5
|
Author: Royal Netherlands Institute for Sea Research
|
|
6
6
|
License-Expression: MIT
|
|
@@ -74,6 +74,14 @@ cd das-cli
|
|
|
74
74
|
pip install -e .
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
+
### Upgrade
|
|
78
|
+
|
|
79
|
+
To upgrade to the latest version of das-cli:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pip install --upgrade das-cli
|
|
83
|
+
```
|
|
84
|
+
|
|
77
85
|
## CLI Usage
|
|
78
86
|
|
|
79
87
|
The package installs a `das` executable for interacting with the DAS API.
|
|
@@ -261,6 +269,41 @@ das ai logout [--force]
|
|
|
261
269
|
|
|
262
270
|
The DAS CLI provides three layers of interaction: CLI commands, Manager layer, and Service layer. Below are examples for each command showing usage at all three layers.
|
|
263
271
|
|
|
272
|
+
### Login
|
|
273
|
+
|
|
274
|
+
Before using the Python API (e.g. `EntryManager`, `SearchManager`, `DownloadManager`), you must authenticate. The managers read the API URL and token from the stored configuration.
|
|
275
|
+
|
|
276
|
+
**Option 1 – Login via CLI first (recommended):**
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
das login --api-url https://your-das-instance/api --username your_username --password your_password
|
|
280
|
+
# Or omit --username/--password to be prompted securely
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Then in Python:
|
|
284
|
+
|
|
285
|
+
```python
|
|
286
|
+
from das.managers.entries_manager import EntryManager
|
|
287
|
+
|
|
288
|
+
entry_manager = EntryManager()
|
|
289
|
+
entry = entry_manager.get(code="7b.b.4c")
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**Option 2 – Login programmatically with `Das`:**
|
|
293
|
+
|
|
294
|
+
```python
|
|
295
|
+
from das.app import Das
|
|
296
|
+
from das.managers.entries_manager import EntryManager
|
|
297
|
+
|
|
298
|
+
# Authenticate and store credentials
|
|
299
|
+
client = Das("https://your-das-instance/api")
|
|
300
|
+
client.authenticate("your_username", "your_password")
|
|
301
|
+
|
|
302
|
+
# Now EntryManager (and other managers) can use the stored config
|
|
303
|
+
entry_manager = EntryManager()
|
|
304
|
+
entry = entry_manager.get(code="7b.b.4c")
|
|
305
|
+
```
|
|
306
|
+
|
|
264
307
|
### Entries
|
|
265
308
|
|
|
266
309
|
#### Get Entry
|
|
@@ -960,6 +1003,47 @@ das config ssl-verify false
|
|
|
960
1003
|
das config ssl-status
|
|
961
1004
|
```
|
|
962
1005
|
|
|
1006
|
+
### Environment variables
|
|
1007
|
+
|
|
1008
|
+
You can use a `.env` file in the project root (or current directory) for local configuration. Copy `.env.example` to `.env` and fill in the values:
|
|
1009
|
+
|
|
1010
|
+
```bash
|
|
1011
|
+
cp .env.example .env
|
|
1012
|
+
```
|
|
1013
|
+
|
|
1014
|
+
Example `.env` (based on `.env.example`):
|
|
1015
|
+
|
|
1016
|
+
```env
|
|
1017
|
+
# DAS API credentials (used by tests and scripts; CLI uses `das login` for interactive use)
|
|
1018
|
+
USER_NAME=
|
|
1019
|
+
USER_PASSWORD=
|
|
1020
|
+
|
|
1021
|
+
# DAS API base URL (e.g. https://api.das-dev.nioz.nl or https://localhost:44301)
|
|
1022
|
+
API_URL=
|
|
1023
|
+
|
|
1024
|
+
# PyPI/Twine credentials for publishing packages (deploy.ps1, etc.)
|
|
1025
|
+
TWINE_USERNAME=__token__
|
|
1026
|
+
TWINE_PASSWORD=
|
|
1027
|
+
|
|
1028
|
+
# Enable or disable SSL certificate verification (True/False). Overrides config when set.
|
|
1029
|
+
VERIFY_SSL=
|
|
1030
|
+
|
|
1031
|
+
# OpenAI model ID for the AI feature (e.g. gpt-4, gpt-4o-mini). Used by `das ai enable`.
|
|
1032
|
+
OPEN_AI_MODEL_ID=
|
|
1033
|
+
```
|
|
1034
|
+
|
|
1035
|
+
| Variable | Description |
|
|
1036
|
+
|----------|-------------|
|
|
1037
|
+
| `USER_NAME` | DAS username. Used by tests and scripts for authentication. The CLI typically uses `das login` instead. |
|
|
1038
|
+
| `USER_PASSWORD` | DAS password. Used by tests and scripts. Never commit this to version control. |
|
|
1039
|
+
| `API_URL` | DAS API base URL (e.g. `https://api.das-dev.nioz.nl` or `https://localhost:44301`). Used by tests, scripts, and when no URL is stored via `das login`. |
|
|
1040
|
+
| `TWINE_USERNAME` | PyPI/Twine username. Use `__token__` when publishing with an API token. |
|
|
1041
|
+
| `TWINE_PASSWORD` | PyPI/Twine password or API token. Used by `deploy.ps1` when publishing packages. |
|
|
1042
|
+
| `VERIFY_SSL` | Set to `True` or `False` to control SSL certificate verification. Overrides the value from `das config ssl-verify` when set. |
|
|
1043
|
+
| `OPEN_AI_MODEL_ID` | OpenAI model ID (e.g. `gpt-4`, `gpt-4o-mini`). Used by the AI feature (`das ai enable`). |
|
|
1044
|
+
|
|
1045
|
+
**Note:** The `.env` file is gitignored. Do not commit credentials.
|
|
1046
|
+
|
|
963
1047
|
## Downloads
|
|
964
1048
|
|
|
965
1049
|
```bash
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|