das-cli 1.0.6__tar.gz → 1.0.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.

Potentially problematic release.


This version of das-cli might be problematic. Click here for more details.

Files changed (36) hide show
  1. {das_cli-1.0.6/das_cli.egg-info → das_cli-1.0.9}/PKG-INFO +1 -1
  2. {das_cli-1.0.6 → das_cli-1.0.9}/das/common/config.py +6 -0
  3. {das_cli-1.0.6 → das_cli-1.0.9}/das/managers/search_manager.py +12 -1
  4. {das_cli-1.0.6 → das_cli-1.0.9/das_cli.egg-info}/PKG-INFO +1 -1
  5. {das_cli-1.0.6 → das_cli-1.0.9}/pyproject.toml +1 -1
  6. {das_cli-1.0.6 → das_cli-1.0.9}/LICENSE +0 -0
  7. {das_cli-1.0.6 → das_cli-1.0.9}/MANIFEST.in +0 -0
  8. {das_cli-1.0.6 → das_cli-1.0.9}/README.md +0 -0
  9. {das_cli-1.0.6 → das_cli-1.0.9}/das/__init__.py +0 -0
  10. {das_cli-1.0.6 → das_cli-1.0.9}/das/ai/plugins/dasai.py +0 -0
  11. {das_cli-1.0.6 → das_cli-1.0.9}/das/ai/plugins/entries/entries_plugin.py +0 -0
  12. {das_cli-1.0.6 → das_cli-1.0.9}/das/app.py +0 -0
  13. {das_cli-1.0.6 → das_cli-1.0.9}/das/authentication/auth.py +0 -0
  14. {das_cli-1.0.6 → das_cli-1.0.9}/das/authentication/secure_input.py +0 -0
  15. {das_cli-1.0.6 → das_cli-1.0.9}/das/cli.py +0 -0
  16. {das_cli-1.0.6 → das_cli-1.0.9}/das/common/api.py +0 -0
  17. {das_cli-1.0.6 → das_cli-1.0.9}/das/common/entry_fields_constants.py +0 -0
  18. {das_cli-1.0.6 → das_cli-1.0.9}/das/common/enums.py +0 -0
  19. {das_cli-1.0.6 → das_cli-1.0.9}/das/common/file_utils.py +0 -0
  20. {das_cli-1.0.6 → das_cli-1.0.9}/das/managers/__init__.py +0 -0
  21. {das_cli-1.0.6 → das_cli-1.0.9}/das/managers/download_manager.py +0 -0
  22. {das_cli-1.0.6 → das_cli-1.0.9}/das/managers/entries_manager.py +0 -0
  23. {das_cli-1.0.6 → das_cli-1.0.9}/das/services/attributes.py +0 -0
  24. {das_cli-1.0.6 → das_cli-1.0.9}/das/services/cache.py +0 -0
  25. {das_cli-1.0.6 → das_cli-1.0.9}/das/services/downloads.py +0 -0
  26. {das_cli-1.0.6 → das_cli-1.0.9}/das/services/entries.py +0 -0
  27. {das_cli-1.0.6 → das_cli-1.0.9}/das/services/entry_fields.py +0 -0
  28. {das_cli-1.0.6 → das_cli-1.0.9}/das/services/hangfire.py +0 -0
  29. {das_cli-1.0.6 → das_cli-1.0.9}/das/services/search.py +0 -0
  30. {das_cli-1.0.6 → das_cli-1.0.9}/das/services/users.py +0 -0
  31. {das_cli-1.0.6 → das_cli-1.0.9}/das_cli.egg-info/SOURCES.txt +0 -0
  32. {das_cli-1.0.6 → das_cli-1.0.9}/das_cli.egg-info/dependency_links.txt +0 -0
  33. {das_cli-1.0.6 → das_cli-1.0.9}/das_cli.egg-info/entry_points.txt +0 -0
  34. {das_cli-1.0.6 → das_cli-1.0.9}/das_cli.egg-info/requires.txt +0 -0
  35. {das_cli-1.0.6 → das_cli-1.0.9}/das_cli.egg-info/top_level.txt +0 -0
  36. {das_cli-1.0.6 → das_cli-1.0.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: das-cli
3
- Version: 1.0.6
3
+ Version: 1.0.9
4
4
  Summary: DAS api client.
5
5
  Author: Royal Netherlands Institute for Sea Research
6
6
  License-Expression: MIT
@@ -81,12 +81,18 @@ def load_verify_ssl() -> bool:
81
81
 
82
82
  if os.getenv("VERIFY_SSL") is not None:
83
83
  VERIFY_SSL = os.getenv("VERIFY_SSL") == "True"
84
+ if not VERIFY_SSL:
85
+ print("SSL certificate verification is disabled")
84
86
  return VERIFY_SSL
85
87
 
86
88
  verify = config.get("verify_ssl")
87
89
  if verify is not None:
88
90
  VERIFY_SSL = verify
91
+ if not VERIFY_SSL:
92
+ print("SSL certificate verification is disabled")
89
93
  return verify
94
+ else:
95
+ raise ValueError("SSL certificate verification is not set")
90
96
  except Exception:
91
97
  pass
92
98
  return VERIFY_SSL
@@ -59,6 +59,17 @@ class SearchManager:
59
59
  "sorting": self.__convert_sorting(entry_fields, sort_by, sort_order)
60
60
  }
61
61
  results = self.search_service.search_entries(**search_params)
62
- return results
62
+
63
+ # now we get the results we create a json with the fields in a user friendly format
64
+ results_json = []
65
+ for result in results['items']:
66
+ result_json = {}
67
+ for field in entry_fields:
68
+ result_json[field['displayName']] = result.get('entry').get(f"{field['column']}")
69
+ results_json.append(result_json)
70
+
71
+ result_json['totalCount'] = results['totalCount']
72
+
73
+ return results_json
63
74
  except Exception as e:
64
75
  raise ValueError(f"Search failed: {str(e)}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: das-cli
3
- Version: 1.0.6
3
+ Version: 1.0.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.0.6"
7
+ version = "1.0.9"
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