pyegeria 5.4.7.2__py3-none-any.whl → 5.4.7.3__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.
pyegeria/_client_new.py CHANGED
@@ -156,6 +156,25 @@ class Client2:
156
156
  self._template_request_adapter = TypeAdapter(TemplateRequestBody)
157
157
  self._update_relationship_request_adapter = TypeAdapter(UpdateRelationshipRequestBody)
158
158
  self._results_request_adapter = TypeAdapter(ResultsRequestBody)
159
+ try:
160
+ result = self.check_connection()
161
+ logger.info(f"client initialized, platform origin is: {result}")
162
+ except PyegeriaConnectionException as e:
163
+ raise
164
+
165
+ async def _async_check_connection(self) -> str:
166
+ """Check if the connection is working"""
167
+ try:
168
+ response = await self.async_get_platform_origin()
169
+ return response
170
+
171
+ except PyegeriaConnectionException as e:
172
+ raise
173
+ def check_connection(self) -> str:
174
+ """Check if the connection is working"""
175
+ loop = asyncio.get_event_loop()
176
+ response = loop.run_until_complete(self._async_check_connection())
177
+ return response
159
178
 
160
179
  def __enter__(self):
161
180
  return self
@@ -365,13 +384,13 @@ class Client2:
365
384
  """Retrieve and return the bearer token"""
366
385
  return self.text_headers["Authorization"]
367
386
 
368
- def get_platform_origin(self) -> str:
387
+ async def async_get_platform_origin(self) -> str:
369
388
  """Return the platform origin string if reachable.
370
-
389
+
371
390
  Historically this method returned a boolean; tests and helpers expect the actual origin text.
372
391
  """
373
392
  origin_url = f"{self.platform_url}/open-metadata/platform-services/users/{self.user_id}/server-platform/origin"
374
- response = self.make_request("GET", origin_url, is_json=False)
393
+ response = await self._async_make_request("GET", origin_url, is_json=False)
375
394
  if response.status_code == 200:
376
395
  text = response.text.strip()
377
396
  logger.success(f"Got response from {origin_url}\n Response: {text}")
@@ -380,6 +399,16 @@ class Client2:
380
399
  logger.info(f"Got response from {origin_url}\n status_code: {response.status_code}")
381
400
  return ""
382
401
 
402
+
403
+ def get_platform_origin(self) -> str:
404
+ """Return the platform origin string if reachable.
405
+
406
+ Historically this method returned a boolean; tests and helpers expect the actual origin text.
407
+ """
408
+ loop = asyncio.get_event_loop()
409
+ response = loop.run_until_complete(self.async_get_platform_origin())
410
+ return response
411
+
383
412
  # @logger.catch
384
413
  def make_request(
385
414
  self,
@@ -129,8 +129,8 @@ class CollectionManager(Client2):
129
129
 
130
130
 
131
131
  Client2.__init__(self, view_server, platform_url, user_id, user_pwd, token)
132
- result = self.get_platform_origin()
133
- logger.info(f"CollectionManager initialized, platform origin is: {result}")
132
+ # result = self.get_platform_origin()
133
+ # logger.info(f"CollectionManager initialized, platform origin is: {result}")
134
134
  self.collection_command_root: str = (
135
135
  f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/collection-manager/collections")
136
136
  #
@@ -72,8 +72,8 @@ class ExternalReferences(Client2):
72
72
  self.user_pwd = user_pwd
73
73
 
74
74
  Client2.__init__(self, view_server, platform_url, user_id, user_pwd, token)
75
- result = self.get_platform_origin()
76
- logger.info(f"ExternalReferences initialized, platform origin is: {result}")
75
+ # result = self.get_platform_origin()
76
+ # logger.info(f"ExternalReferences initialized, platform origin is: {result}")
77
77
  self.command_root: str = (
78
78
  f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/external-references")
79
79
 
@@ -95,8 +95,8 @@ class GlossaryManager(CollectionManager):
95
95
 
96
96
 
97
97
  CollectionManager.__init__(self, view_server, platform_url, user_id, user_pwd, token)
98
- result = self.get_platform_origin()
99
- logger.info(f"GlossaryManager initialized, platform origin is: {result}")
98
+ # result = self.get_platform_origin()
99
+ # logger.info(f"GlossaryManager initialized, platform origin is: {result}")
100
100
  self.glossary_command_root = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/glossary-manager"
101
101
  #
102
102
  # Get Valid Values for Enumerations
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyegeria
3
- Version: 5.4.7.2
3
+ Version: 5.4.7.3
4
4
  Summary: A python client for Egeria
5
5
  Author-email: Dan Wolfson <dan.wolfson@pdr-associates.com>
6
6
  License-Expression: Apache-2.0
@@ -118,7 +118,7 @@ md_processing/md_processing_utils/md_processing_constants.py,sha256=_j8FSsB1mZ2S
118
118
  md_processing/md_processing_utils/message_constants.py,sha256=UBf18obM83umM6zplR7ychre4xLRbBnTzidHDZ2gNvM,548
119
119
  pyegeria/__init__.py,sha256=hgrGk4lBno1rgKRBKWAcljb2wGSHAKhmtu8vbESwUZM,11955
120
120
  pyegeria/_client.py,sha256=hJHn5pD8sbelP_M9dK-M5Z2CYqpRXzXfg1UCgAdQ6dQ,33416
121
- pyegeria/_client_new.py,sha256=9GQDOlmCxGPcAhKT_kkrLlS0x7nnVhha7VVR0rAlBnQ,69777
121
+ pyegeria/_client_new.py,sha256=F-TKZa6pQGOkJl1lpt_Z7G_XLRwZBaEeAJ2ffUKePSc,70855
122
122
  pyegeria/_deprecated_gov_engine.py,sha256=dWNcwVsE5__dF2u4QiIyQrssozzzOjBbLld8MdpmVCQ,17264
123
123
  pyegeria/_exceptions.py,sha256=1SrnV194V4_YJNnNAU0myTHQ3dhLn4GF2B2gZcj1u90,18153
124
124
  pyegeria/_exceptions_new.py,sha256=srmrlqoWy7VvOJOhPcYFKW32MCIovgEg5J7PrYDxzQA,19706
@@ -129,7 +129,7 @@ pyegeria/_validators.py,sha256=pNxND0dN2qvyuGE52N74l1Ezfrh2p9Hao2ziR_t1ENI,7425
129
129
  pyegeria/asset_catalog_omvs.py,sha256=P6FceMP0FgakGSOt3ePxpEbsF7nnypzo1aQahjdL_94,29021
130
130
  pyegeria/automated_curation.py,sha256=wmnfpDcdg4eTtYuRHTCZQe49GxLCBiBBQsKwWVnlzak,142660
131
131
  pyegeria/classification_manager_omvs.py,sha256=eodP8Fn7zi78unsjk0XNW7lnxI7R0Fb7_SLI-HA39PQ,187249
132
- pyegeria/collection_manager.py,sha256=6DEy-77CEKVZZkREFNKoiMEU5Z_XJybDQOfOkpXqnBY,238694
132
+ pyegeria/collection_manager.py,sha256=mwG1KAGOkoDGAUUbA22yWfMpAJdx9D7uXjudU3MZdcY,238698
133
133
  pyegeria/collection_models.py,sha256=d3DdWONqDdAeuUQgussiCNfvhKIDFpaI35cdW_Tv4_0,5315
134
134
  pyegeria/config.py,sha256=N-qHq74GN29Mwfp8MbXvj7uEsKCIXotL7MDwFcj3nIU,29380
135
135
  pyegeria/core_omag_server_config.py,sha256=pNQpocICkZx8sRsTw5DPUe-TFyxlIo1U88qqgci_f7I,97764
@@ -140,11 +140,11 @@ pyegeria/egeria_client.py,sha256=N_CvaUgb8tQtRLsy8dfLNJ2lPPiCrfW-AFiLBxqIlyI,610
140
140
  pyegeria/egeria_config_client.py,sha256=YkgndiZ6-CfhwVeBW9ErS7l95SIrd0G9--H8kAfeBJY,2479
141
141
  pyegeria/egeria_my_client.py,sha256=3dSBUlrivzih75hodNHe-2BM9pGB8AQVLru-_NbhYNE,3186
142
142
  pyegeria/egeria_tech_client.py,sha256=8Apr5YEFL2qgn-QTv9YWTI-23rGI94NiUp4418EiZ4k,4707
143
- pyegeria/external_references.py,sha256=7CNUlnD7MsWZqdLASYSxqfHAU1EqBzuv8_7INYMJI3A,74755
143
+ pyegeria/external_references.py,sha256=WQycWk68nvcQ9WDRum9hI61QbuFCG3iehLhB5eWnBd0,74759
144
144
  pyegeria/feedback_manager_omvs.py,sha256=0xBs0p54vmdfVYYgQ8pOanLC4fxfgTk1Z61Y6D1U7_I,152978
145
145
  pyegeria/format_set_executor.py,sha256=KkOqCuZwk7UeMQUPg_x8UDVmVKYdz5vaQZ8KjZZxDMQ,11318
146
146
  pyegeria/full_omag_server_config.py,sha256=CQqLCy_3DZFvJZEOcGf50HWdFaWpiAIs6z-kKyjvpDA,47464
147
- pyegeria/glossary_manager.py,sha256=EmCnIPG-W0bUD7MVn2Vopb-cb_TR1J8MMOOFzo38aWk,106786
147
+ pyegeria/glossary_manager.py,sha256=0oqD09iP-7ZsibJZEMDwPHqjxqHQW4dlikDuBzwv9qQ,106790
148
148
  pyegeria/governance_officer.py,sha256=OYEewhoe3HBcxTR6kGdKNkwLT4gkQDRGKfFIsVlD5oI,109203
149
149
  pyegeria/load_config.py,sha256=XDwPAHB3MvGRuoP8kg1lJJAI4BgMWZ3TYxfxYROgJj4,1188
150
150
  pyegeria/logging_configuration.py,sha256=BxTQRN-7OOdk5t1f1xSn8gKU8iT-MfWEgbn6cYWrRsY,7674
@@ -169,9 +169,9 @@ pyegeria/template_manager_omvs.py,sha256=chBljs1vy5wr9DRAtbvIt4Cob_7HxGfxLkCNlDT
169
169
  pyegeria/utils.py,sha256=xOTxk9PH8ZGZmgIwz_a6rczTVLADLEjucr10ZJTUnY4,9272
170
170
  pyegeria/valid_metadata_omvs.py,sha256=Xq9DqBQvBFFJzaFIRKcVZ2k4gJvSh9yeXs_j-O3vn1w,65050
171
171
  pyegeria/x_action_author_omvs.py,sha256=XyRsUgN-xnWR-cJayzo5RtY4Xv1uBDML4pwaKHrwC1w,6430
172
- pyegeria-5.4.7.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
173
- pyegeria-5.4.7.2.dist-info/METADATA,sha256=Ol0BECzsUW24clN-S9oXE45fljxtLJl_pIjxZQve5ZQ,5898
174
- pyegeria-5.4.7.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
175
- pyegeria-5.4.7.2.dist-info/entry_points.txt,sha256=Ig9cZyl-nq_RohLvahgWXzZbcpHzLS3Zdc1A8qvdPG0,6595
176
- pyegeria-5.4.7.2.dist-info/top_level.txt,sha256=48Mt-O3p8yO7jiEv6-Y9bUsryqJn9BQsiyV0BqSn8tk,32
177
- pyegeria-5.4.7.2.dist-info/RECORD,,
172
+ pyegeria-5.4.7.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
173
+ pyegeria-5.4.7.3.dist-info/METADATA,sha256=ugQjung_oI1JtNP0vSrLFkVogfN912Fsu4TmdhYduuo,5898
174
+ pyegeria-5.4.7.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
175
+ pyegeria-5.4.7.3.dist-info/entry_points.txt,sha256=Ig9cZyl-nq_RohLvahgWXzZbcpHzLS3Zdc1A8qvdPG0,6595
176
+ pyegeria-5.4.7.3.dist-info/top_level.txt,sha256=48Mt-O3p8yO7jiEv6-Y9bUsryqJn9BQsiyV0BqSn8tk,32
177
+ pyegeria-5.4.7.3.dist-info/RECORD,,