das-cli 1.0.6__py3-none-any.whl → 1.0.9__py3-none-any.whl

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.

das/common/config.py CHANGED
@@ -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
@@ -6,14 +6,14 @@ das/ai/plugins/entries/entries_plugin.py,sha256=Dhv6PrguQj5mzxBW6DlCzkmwucszazLQ
6
6
  das/authentication/auth.py,sha256=DTtH66Ft6nuuMe7EYvrr3GqGVEGGxE7GmD2fO7vRv4s,1501
7
7
  das/authentication/secure_input.py,sha256=P-NpbFeHrp2uIOMqip55cGn_NqqpswhnknAF1t7c2_U,1911
8
8
  das/common/api.py,sha256=9kuM8Gcw29uiYbqw9fPK4w5gTpWv9baxjK9NvHNeb5E,3905
9
- das/common/config.py,sha256=u5Z45FLLEYeNZPrBBLz2mGB35_IV6cmLbVoNpnmrN6I,5817
9
+ das/common/config.py,sha256=VQi_tJ7hvIa--gvx9VCBkfVI9p0ptOvifIu08tc8kEs,6127
10
10
  das/common/entry_fields_constants.py,sha256=5Yh4Ujt70HEF-FsnwVBPBm3DB3HHzQWSWR-9Upt7C5I,93
11
11
  das/common/enums.py,sha256=jS0frv6717duG_wZNockXMTZ-VfsGu_f8_-lgYGnrcY,1745
12
12
  das/common/file_utils.py,sha256=-zePjYsj8iRpQssVQMHDK3Mh5q8FooKJCUCKCXKS6_Y,7006
13
13
  das/managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  das/managers/download_manager.py,sha256=NqaLhmjw-4nZq8SVdN0g5MAnbMPEnu-A3A4oXxQ-IZQ,3776
15
15
  das/managers/entries_manager.py,sha256=Kc_PN71Bp7VICrxoP9MiDCrUzR7OdUXfX5puDDxtm08,19015
16
- das/managers/search_manager.py,sha256=6nRHSc2YosVj5NBoFp2uM09FZiMMVfchoXT8Q-b5oNY,3505
16
+ das/managers/search_manager.py,sha256=A9zo08AzN6w11B_ml8cRASIwdLKUpQGKzzdzuax57aY,3983
17
17
  das/services/attributes.py,sha256=78E9f1wNZYxG9Hg5HfX_h1CFmACaMjwD2Y6Ilb7PJGY,2616
18
18
  das/services/cache.py,sha256=g-vY51gqGV_1Vpza476PkMqGpuDNo1NbTwQWIIsvO0s,1932
19
19
  das/services/downloads.py,sha256=YBDFPmjAQHUK0OUdFprW1Ox81nzpKaJE9xQBJyyEz4Q,3060
@@ -22,9 +22,9 @@ das/services/entry_fields.py,sha256=x2wUDkKNduj9pf4s56hRo0UW-eBhipkU9gFMEjFw5DA,
22
22
  das/services/hangfire.py,sha256=hidmVP9yb4znzBaJJRyKawYx7oYaBv5OVL-t0BhvN_A,818
23
23
  das/services/search.py,sha256=3X_KPb9fs024FhxoTr4j-xY5ymm5rvvzlekxuh8tLdg,1374
24
24
  das/services/users.py,sha256=iNijO2UPIEtcpPy8Tkemdxxym9rYLCUyckQHIQj68W0,795
25
- das_cli-1.0.6.dist-info/licenses/LICENSE,sha256=4EDhysVgQWBlzo0rdUl_k89s-iVfgCcSa1gUx1TM1vA,1124
26
- das_cli-1.0.6.dist-info/METADATA,sha256=4Tr-LGEgUlJoHC0khiw_vHusfHC89y-nWhSH2KhNiLg,10469
27
- das_cli-1.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
- das_cli-1.0.6.dist-info/entry_points.txt,sha256=ZrdMae7NcvogQhzM1zun8E8n_QwYq-LpZvoJCr2_I4g,36
29
- das_cli-1.0.6.dist-info/top_level.txt,sha256=OJsPEeJyJ2rJlpEn2DTPgbMSvYG-6FeD13_m5qLpw3E,4
30
- das_cli-1.0.6.dist-info/RECORD,,
25
+ das_cli-1.0.9.dist-info/licenses/LICENSE,sha256=4EDhysVgQWBlzo0rdUl_k89s-iVfgCcSa1gUx1TM1vA,1124
26
+ das_cli-1.0.9.dist-info/METADATA,sha256=sxcwn9iuTw5G9zzo-xVyWjpATTFjBIJMURLmZtNvgMQ,10469
27
+ das_cli-1.0.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
+ das_cli-1.0.9.dist-info/entry_points.txt,sha256=ZrdMae7NcvogQhzM1zun8E8n_QwYq-LpZvoJCr2_I4g,36
29
+ das_cli-1.0.9.dist-info/top_level.txt,sha256=OJsPEeJyJ2rJlpEn2DTPgbMSvYG-6FeD13_m5qLpw3E,4
30
+ das_cli-1.0.9.dist-info/RECORD,,