das-cli 1.3.5__tar.gz → 1.3.9__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 (40) hide show
  1. {das_cli-1.3.5/das_cli.egg-info → das_cli-1.3.9}/PKG-INFO +1 -1
  2. {das_cli-1.3.5 → das_cli-1.3.9}/das/common/config.py +16 -6
  3. {das_cli-1.3.5 → das_cli-1.3.9}/das/managers/search_manager.py +3 -2
  4. {das_cli-1.3.5 → das_cli-1.3.9/das_cli.egg-info}/PKG-INFO +1 -1
  5. {das_cli-1.3.5 → das_cli-1.3.9}/pyproject.toml +1 -1
  6. {das_cli-1.3.5 → das_cli-1.3.9}/LICENSE +0 -0
  7. {das_cli-1.3.5 → das_cli-1.3.9}/MANIFEST.in +0 -0
  8. {das_cli-1.3.5 → das_cli-1.3.9}/README.md +0 -0
  9. {das_cli-1.3.5 → das_cli-1.3.9}/das/__init__.py +0 -0
  10. {das_cli-1.3.5 → das_cli-1.3.9}/das/ai/plugins/dasai.py +0 -0
  11. {das_cli-1.3.5 → das_cli-1.3.9}/das/ai/plugins/entries/entries_plugin.py +0 -0
  12. {das_cli-1.3.5 → das_cli-1.3.9}/das/app.py +0 -0
  13. {das_cli-1.3.5 → das_cli-1.3.9}/das/authentication/auth.py +0 -0
  14. {das_cli-1.3.5 → das_cli-1.3.9}/das/authentication/oauth.py +0 -0
  15. {das_cli-1.3.5 → das_cli-1.3.9}/das/authentication/secure_input.py +0 -0
  16. {das_cli-1.3.5 → das_cli-1.3.9}/das/cli.py +0 -0
  17. {das_cli-1.3.5 → das_cli-1.3.9}/das/common/api.py +0 -0
  18. {das_cli-1.3.5 → das_cli-1.3.9}/das/common/entry_fields_constants.py +0 -0
  19. {das_cli-1.3.5 → das_cli-1.3.9}/das/common/enums.py +0 -0
  20. {das_cli-1.3.5 → das_cli-1.3.9}/das/common/file_utils.py +0 -0
  21. {das_cli-1.3.5 → das_cli-1.3.9}/das/managers/__init__.py +0 -0
  22. {das_cli-1.3.5 → das_cli-1.3.9}/das/managers/digital_objects_manager.py +0 -0
  23. {das_cli-1.3.5 → das_cli-1.3.9}/das/managers/download_manager.py +0 -0
  24. {das_cli-1.3.5 → das_cli-1.3.9}/das/managers/entries_manager.py +0 -0
  25. {das_cli-1.3.5 → das_cli-1.3.9}/das/services/attributes.py +0 -0
  26. {das_cli-1.3.5 → das_cli-1.3.9}/das/services/cache.py +0 -0
  27. {das_cli-1.3.5 → das_cli-1.3.9}/das/services/digital_objects.py +0 -0
  28. {das_cli-1.3.5 → das_cli-1.3.9}/das/services/downloads.py +0 -0
  29. {das_cli-1.3.5 → das_cli-1.3.9}/das/services/entries.py +0 -0
  30. {das_cli-1.3.5 → das_cli-1.3.9}/das/services/entry_fields.py +0 -0
  31. {das_cli-1.3.5 → das_cli-1.3.9}/das/services/hangfire.py +0 -0
  32. {das_cli-1.3.5 → das_cli-1.3.9}/das/services/search.py +0 -0
  33. {das_cli-1.3.5 → das_cli-1.3.9}/das/services/service_base.py +0 -0
  34. {das_cli-1.3.5 → das_cli-1.3.9}/das/services/users.py +0 -0
  35. {das_cli-1.3.5 → das_cli-1.3.9}/das_cli.egg-info/SOURCES.txt +0 -0
  36. {das_cli-1.3.5 → das_cli-1.3.9}/das_cli.egg-info/dependency_links.txt +0 -0
  37. {das_cli-1.3.5 → das_cli-1.3.9}/das_cli.egg-info/entry_points.txt +0 -0
  38. {das_cli-1.3.5 → das_cli-1.3.9}/das_cli.egg-info/requires.txt +0 -0
  39. {das_cli-1.3.5 → das_cli-1.3.9}/das_cli.egg-info/top_level.txt +0 -0
  40. {das_cli-1.3.5 → das_cli-1.3.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: das-cli
3
- Version: 1.3.5
3
+ Version: 1.3.9
4
4
  Summary: DAS api client.
5
5
  Author: Royal Netherlands Institute for Sea Research
6
6
  License-Expression: MIT
@@ -65,6 +65,8 @@ def save_verify_ssl(verify: bool) -> None:
65
65
  except Exception:
66
66
  config = {}
67
67
  config["verify_ssl"] = verify
68
+ # Explicit CLI setting should take precedence over environment defaults.
69
+ config["verify_ssl_explicit"] = True
68
70
  VERIFY_SSL = verify
69
71
  CONFIG_FILE.write_text(json.dumps(config), encoding="utf-8")
70
72
 
@@ -79,21 +81,29 @@ def load_verify_ssl() -> bool:
79
81
  if CONFIG_FILE.exists():
80
82
  try:
81
83
  config = json.loads(CONFIG_FILE.read_text(encoding="utf-8"))
82
-
83
- if os.getenv("VERIFY_SSL") is not None:
84
- VERIFY_SSL = os.getenv("VERIFY_SSL") == "True"
84
+
85
+ verify = config.get("verify_ssl")
86
+ verify_explicit = config.get("verify_ssl_explicit", False)
87
+ if verify is not None and verify_explicit:
88
+ VERIFY_SSL = verify
89
+ if not VERIFY_SSL:
90
+ print("SSL certificate verification is disabled")
91
+ return verify
92
+
93
+ env_verify_ssl = os.getenv("VERIFY_SSL")
94
+ if env_verify_ssl is not None:
95
+ VERIFY_SSL = env_verify_ssl.strip().lower() == "true"
85
96
  if not VERIFY_SSL:
86
97
  print("SSL certificate verification is disabled")
87
98
  return VERIFY_SSL
88
99
 
89
- verify = config.get("verify_ssl")
90
100
  if verify is not None:
91
101
  VERIFY_SSL = verify
92
102
  if not VERIFY_SSL:
93
103
  print("SSL certificate verification is disabled")
94
104
  return verify
95
- else:
96
- raise ValueError("SSL certificate verification is not set")
105
+
106
+ raise ValueError("SSL certificate verification is not set")
97
107
  except Exception:
98
108
  pass
99
109
  return VERIFY_SSL
@@ -52,7 +52,7 @@ class SearchManager:
52
52
  raise ValueError(f"Sorting field '{sort_by}' not found in entry fields.")
53
53
  return f"{field.get('column')} {sort_order}"
54
54
 
55
- def search_entries(self, attribute: str, query: str, max_results: int = 10, page: int = 1, sort_by: str = "Name", sort_order: str = "asc"):
55
+ def search_entries(self, attribute: str, query: str, max_results: int = 10, page: int = 1, sort_by: str = "Name", sort_order: str = "asc", includeRelationsId: bool = False):
56
56
  """Search entries based on provided criteria."""
57
57
  try:
58
58
  # Validate attribute
@@ -77,7 +77,8 @@ class SearchManager:
77
77
  "queryString": self.__convert_filter(entry_fields, query),
78
78
  "maxResultCount": max_results,
79
79
  "skipCount": 0 if page <= 0 else (max_results * (page - 1)),
80
- "sorting": self.__convert_sorting(entry_fields, sort_by, sort_order)
80
+ "sorting": self.__convert_sorting(entry_fields, sort_by, sort_order),
81
+ "includeRelationsId": includeRelationsId
81
82
  }
82
83
  results = self.search_service.search_entries(**search_params)
83
84
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: das-cli
3
- Version: 1.3.5
3
+ Version: 1.3.9
4
4
  Summary: DAS api client.
5
5
  Author: Royal Netherlands Institute for Sea Research
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "das-cli"
7
- version = "1.3.05"
7
+ version = "1.3.09"
8
8
  authors = [
9
9
  { name="Royal Netherlands Institute for Sea Research" },
10
10
  ]
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