pyegeria 5.4.7.3__py3-none-any.whl → 5.4.7.5__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.
Files changed (45) hide show
  1. commands/cat/dr_egeria_md.py +1 -1
  2. commands/cat/list_format_set.py +6 -1
  3. commands/ops/__init__.py +0 -2
  4. commands/ops/list_catalog_targets.py +17 -15
  5. commands/ops/load_archive.py +3 -3
  6. commands/ops/monitor_engine_activity.py +1 -1
  7. commands/ops/monitor_engine_activity_c.py +1 -1
  8. commands/tech/__init__.py +0 -2
  9. commands/tech/list_gov_action_processes.py +4 -8
  10. md_processing/dr_egeria.py +1 -1
  11. md_processing/md_commands/ext_ref_commands.py +1 -2
  12. md_processing/md_commands/glossary_commands.py +1 -2
  13. md_processing/md_commands/project_commands.py +1 -2
  14. pyegeria/__init__.py +4 -96
  15. pyegeria/_client_new.py +658 -64
  16. pyegeria/_globals.py +95 -1
  17. pyegeria/_output_formats.py +1 -1
  18. pyegeria/asset_catalog_omvs.py +1 -1
  19. pyegeria/automated_curation.py +788 -857
  20. pyegeria/classification_manager.py +7212 -0
  21. pyegeria/classification_manager_omvs.py +1989 -1853
  22. pyegeria/collection_manager.py +14 -2
  23. pyegeria/data_designer.py +1 -2
  24. pyegeria/egeria_tech_client.py +3 -0
  25. pyegeria/external_references.py +1 -1
  26. pyegeria/format_set_executor.py +8 -9
  27. pyegeria/full_omag_server_config.py +1 -1
  28. pyegeria/mcp_adapter.py +1 -1
  29. pyegeria/mcp_server.py +36 -21
  30. pyegeria/md_processing_utils.py +3 -3
  31. pyegeria/md_processing_utils_orig.py +3 -3
  32. pyegeria/mermaid_utilities.py +0 -152
  33. pyegeria/models.py +5 -0
  34. pyegeria/output_formatter.py +1 -1
  35. pyegeria/project_manager.py +8 -0
  36. pyegeria/reference_data.py +4 -0
  37. pyegeria/runtime_manager_omvs.py +1 -1
  38. pyegeria/solution_architect.py +1 -1
  39. {pyegeria-5.4.7.3.dist-info → pyegeria-5.4.7.5.dist-info}/METADATA +1 -1
  40. {pyegeria-5.4.7.3.dist-info → pyegeria-5.4.7.5.dist-info}/RECORD +44 -44
  41. pyegeria/md_processing_helpers.py +0 -58
  42. {pyegeria-5.4.7.3.dist-info → pyegeria-5.4.7.5.dist-info}/WHEEL +0 -0
  43. {pyegeria-5.4.7.3.dist-info → pyegeria-5.4.7.5.dist-info}/entry_points.txt +0 -0
  44. {pyegeria-5.4.7.3.dist-info → pyegeria-5.4.7.5.dist-info}/licenses/LICENSE +0 -0
  45. {pyegeria-5.4.7.3.dist-info → pyegeria-5.4.7.5.dist-info}/top_level.txt +0 -0
@@ -93,8 +93,20 @@ class DigitalProductProperties(CollectionProperties):
93
93
  next_version_date: datetime | None = None
94
94
  withdrawal_date: datetime | None = None
95
95
 
96
+ class DigitalProductFamilyProperties(CollectionProperties):
97
+ class_: Annotated[Literal["DigitalProductFamilyProperties"], Field(alias="class")]
98
+ user_defined_status: str | None = None
99
+ product_name: str | None = None
100
+ identifier: str | None = None
101
+ introduction_date: datetime | None = None
102
+ maturity: str | None = None
103
+ service_life: str | None = None
104
+ next_version_date: datetime | None = None
105
+ withdrawal_date: datetime | None = None
106
+
107
+
96
108
  class Collections(PyegeriaModel):
97
- collection: Union[CollectionProperties, DigitalSubscriptionProperties, DigitalProductProperties, AgreementProperties,
109
+ collection: Union[CollectionProperties, DigitalSubscriptionProperties, DigitalProductProperties, DigitalProductFamilyProperties,AgreementProperties,
98
110
  DataSpecProperties, DataDictionaryProperties] = Field(desciminator="class_")
99
111
 
100
112
 
@@ -5505,7 +5517,7 @@ class CollectionManager(Client2):
5505
5517
  # finally, construct a list of member information
5506
5518
  for member_rel in members:
5507
5519
  member_guid = member_rel["elementHeader"]["guid"]
5508
- member = await self._async_get_element_by_guid_(member_guid)
5520
+ member = await self.async_get_element_by_guid_(member_guid)
5509
5521
  if isinstance(member, dict):
5510
5522
  member_instance = {
5511
5523
  "name": member["properties"].get('displayName', ''),
pyegeria/data_designer.py CHANGED
@@ -11,8 +11,7 @@ import asyncio
11
11
 
12
12
  from loguru import logger
13
13
 
14
- from pyegeria import Client2
15
- from pyegeria._client import max_paging_size
14
+ from pyegeria._client_new import max_paging_size, Client2
16
15
  from pyegeria._output_formats import select_output_format_set, get_output_format_type_match
17
16
  from pyegeria.models import (SearchStringRequestBody, FilterRequestBody, GetRequestBody, NewElementRequestBody,
18
17
  TemplateRequestBody,
@@ -67,6 +67,8 @@ class EgeriaTech:
67
67
  self._gov_officer = GovernanceOfficer(view_server, platform_url, user_id, user_pwd, token)
68
68
  self._collections = CollectionManager(view_server, platform_url, user_id, user_pwd, token)
69
69
  self._external_references = ExternalReferences(view_server, platform_url, user_id, user_pwd, token)
70
+ self._classification_manager = ClassificationManager(view_server, platform_url, user_id, user_pwd, token)
71
+
70
72
 
71
73
  self._subclients = [
72
74
  self._auto_curate,
@@ -82,6 +84,7 @@ class EgeriaTech:
82
84
  self._gov_officer,
83
85
  self._collections,
84
86
  self._external_references,
87
+ self._classification_manager
85
88
  ]
86
89
  self.NO_ELEMENTS_FOUND = NO_ELEMENTS_FOUND
87
90
 
@@ -1252,7 +1252,7 @@ class ExternalReferences(Client2):
1252
1252
  ignore_case : bool, [default=False], optional
1253
1253
  Ignore case when searching
1254
1254
  start_from: int, [default=0], optional
1255
- When multiple pages of results are available, the page number to start from.
1255
+ When multiple pages of results are available, the page number to start from.
1256
1256
  page_size: int, [default=None]
1257
1257
  The number of items to return in a single page. If not specified, the default will be taken from
1258
1258
  the class instance.
@@ -20,13 +20,11 @@ from typing import Any, Dict, Optional
20
20
 
21
21
  from loguru import logger
22
22
 
23
- from pyegeria import (
24
- EgeriaTech,
25
- CollectionManager,
26
- GovernanceOfficer,
27
- GlossaryManager,
28
- NO_ELEMENTS_FOUND,
29
- )
23
+ from pyegeria.egeria_tech_client import EgeriaTech
24
+ from pyegeria.collection_manager import CollectionManager
25
+ from pyegeria.governance_officer import GovernanceOfficer
26
+ from pyegeria.glossary_manager import GlossaryManager
27
+ from pyegeria._globals import NO_ELEMENTS_FOUND
30
28
  from pyegeria.config import settings
31
29
  from pyegeria.external_references import ExternalReferences
32
30
  from pyegeria._exceptions_new import PyegeriaException
@@ -93,6 +91,8 @@ async def _async_run_report(
93
91
  - {"kind":"unknown","raw": any}
94
92
  """
95
93
  params = dict(params or {})
94
+ user_name = egeria_client.user_id
95
+ user_pwd = egeria_client.user_pwd
96
96
 
97
97
  # Resolve the format set and action
98
98
  fmt = select_output_format_set(report_name, output_format)
@@ -141,7 +141,6 @@ async def _async_run_report(
141
141
 
142
142
 
143
143
  try:
144
- egeria_client.create_egeria_bearer_token()
145
144
  func = getattr(egeria_client, method_name) if method_name and hasattr(egeria_client, method_name) else None
146
145
  # Add logging to validate func
147
146
  msg = f"DEBUG: func={func}, method_name={method_name}, client_class={client_class}"
@@ -152,7 +151,7 @@ async def _async_run_report(
152
151
  raise TypeError(
153
152
  f"Resolved function '{method_name}' not found in client class '{client_class.__name__}' is not callable."
154
153
  )
155
-
154
+ token = await egeria_client._async_create_egeria_bearer_token(user_name, user_pwd)
156
155
  result = await func(**call_params)
157
156
 
158
157
  if not result or result == NO_ELEMENTS_FOUND:
@@ -9,7 +9,7 @@ Copyright Contributors to the ODPi Egeria project.
9
9
  import json
10
10
  from pyegeria.utils import body_slimmer
11
11
  from pyegeria._client import Client
12
- from pyegeria import TEMPLATE_GUIDS, max_paging_size
12
+ from pyegeria._globals import max_paging_size
13
13
  from pyegeria._exceptions import InvalidParameterException
14
14
  from pyegeria._globals import enable_ssl_check
15
15
  from pyegeria._validators import validate_name, validate_url
pyegeria/mcp_adapter.py CHANGED
@@ -97,7 +97,7 @@ def run_report(
97
97
  # Lazy import of settings to avoid circulars when optional args are None
98
98
  from pyegeria.config import settings as _settings
99
99
  logger.info(f"Format set: {report}\nparams: {json.dumps(params)}\nview_server: {view_server}\nview_url: {view_url}\nuser: {user}\nuser_pass: {user_pass}")
100
- return run_format_set(
100
+ return exec_format_set(
101
101
  format_set_name=report,
102
102
  output_format="DICT",
103
103
  params=params or {},
pyegeria/mcp_server.py CHANGED
@@ -5,11 +5,18 @@ This module provides a basic MCP server for Egeria.
5
5
  """
6
6
  import re
7
7
  import sys
8
+ import nest_asyncio
9
+
8
10
  from typing import Any, Dict, Optional
9
11
 
12
+ from mcp.server.fastmcp.exceptions import ValidationError
13
+
10
14
  from pyegeria.egeria_tech_client import EgeriaTech
15
+ from pyegeria._exceptions_new import print_validation_error
16
+
11
17
 
12
18
  GLOBAL_EGERIA_CLIENT: Optional[EgeriaTech] = None
19
+ nest_asyncio.apply()
13
20
 
14
21
  try:
15
22
  # We use Optional[] and List[] types, so we import them.
@@ -42,16 +49,22 @@ def main() -> None:
42
49
  """
43
50
  print("DEBUG: Initializing Egeria client...", file=sys.stderr)
44
51
  from pyegeria.config import settings as _settings
52
+ user_id = _settings.User_Profile.user_name
53
+ user_pwd = _settings.User_Profile.user_pwd
45
54
 
46
55
  GLOBAL_EGERIA_CLIENT = EgeriaTech(
47
56
  _settings.Environment.egeria_view_server,
48
57
  _settings.Environment.egeria_view_server_url,
49
- _settings.User_Profile.user_name,
50
- _settings.User_Profile.user_pwd
58
+ user_id,
59
+ user_pwd
51
60
  )
61
+ print("DEBUG: Egeria Client initialized", file=sys.stderr)
52
62
  GLOBAL_EGERIA_CLIENT.create_egeria_bearer_token("erinoverview","secret")
53
63
  print("DEBUG: Egeria Client connected", file=sys.stderr)
54
64
 
65
+ except ValidationError as e:
66
+ print_validation_error(e)
67
+ raise
55
68
  except Exception as e:
56
69
  print(f"DEBUG: Exception occurred: {str(e)}", file=sys.stderr)
57
70
  raise
@@ -89,6 +102,9 @@ def main() -> None:
89
102
  ignore_case: Optional[bool] = None,
90
103
  output_format: str = "DICT"
91
104
  ) -> Dict[str, Any]:
105
+ import asyncio
106
+ import nest_asyncio
107
+ nest_asyncio.apply()
92
108
 
93
109
  """Run a report with the specified parameters."""
94
110
  print("DEBUG: Running report...", file=sys.stderr)
@@ -118,12 +134,18 @@ def main() -> None:
118
134
 
119
135
  egeria_client: EgeriaTech = GLOBAL_EGERIA_CLIENT
120
136
  print("DEBUG: Egeria Client connected", file=sys.stderr)
121
-
122
- result = await _async_run_report_tool(
123
- report=report_name,
124
- egeria_client=egeria_client,
125
- params=params
137
+ result = await asyncio.wait_for(
138
+ _async_run_report_tool(
139
+ report=report_name,
140
+ egeria_client=egeria_client,
141
+ params=params),
142
+ timeout=30 # Adjust timeout as needed
126
143
  )
144
+ # result = await _async_run_report_tool(
145
+ # report=report_name,
146
+ # egeria_client=egeria_client,
147
+ # params=params
148
+ # )
127
149
  print("DEBUG: run_report completed successfully", file=sys.stderr)
128
150
  return _ok(result)
129
151
  except Exception as e:
@@ -132,7 +154,7 @@ def main() -> None:
132
154
  raise
133
155
 
134
156
  @srv.tool(name="prompt")
135
- def natural_language_prompt(prompt: str) -> Dict[str, Any]:
157
+ async def natural_language_prompt(prompt: str) -> Dict[str, Any]:
136
158
  """
137
159
  Handles natural language queries from the user.
138
160
  In a production environment, this would call an LLM API.
@@ -142,11 +164,9 @@ def main() -> None:
142
164
  # Example of simple logic: If the user asks to list reports, delegate to the tool.
143
165
  if "list" in prompt.lower() and "reports" in prompt.lower():
144
166
  print("DEBUG: Delegating prompt to list_reports tool.", file=sys.stderr)
145
- return list_reports() # Call the standard tool function directly
167
+ return list_reports() # This is sync, so no await needed
146
168
  elif "run" in prompt.lower() and "report" in prompt.lower():
147
169
  print("DEBUG: Delegating prompt to run_report tool.", file=sys.stderr)
148
- # Simple entity extraction for report name (Requires more robust logic in reality!)
149
- # Let's assume the report name is the word immediately following "report"
150
170
 
151
171
  match = re.search(r'report\s+([a-zA-Z0-9]+)', prompt, re.IGNORECASE)
152
172
  report_name = match.group(1) if match else None
@@ -154,37 +174,32 @@ def main() -> None:
154
174
  if report_name:
155
175
  print(f"DEBUG: Extracted report name: {report_name}", file=sys.stderr)
156
176
 
157
- # Use another simple regex to look for page size
158
177
  page_size_match = re.search(r'page size of\s+(\d+)', prompt, re.IGNORECASE)
159
178
  page_size = int(page_size_match.group(1)) if page_size_match else None
160
179
 
161
180
  search_match = re.search(r'search for\s+(.*?)(?:\s+in\s+report|\.|$)', prompt, re.IGNORECASE)
162
181
 
163
182
  if search_match:
164
- # Extract the content captured by the group (.*?)
165
183
  search_string = search_match.group(1).strip()
166
184
 
167
- # Check if the search string is meaningful
168
185
  if search_string:
169
- # Use a default report for demonstration purposes
170
-
171
186
  print(
172
187
  f"DEBUG: Delegating prompt to run_report tool. Report: {report_name}, Search: '{search_string}'",
173
188
  file=sys.stderr)
174
189
 
175
- # Call the standard tool function with extracted parameters
176
- return run_report_tool(
190
+ # AWAIT the async function call
191
+ return await run_report_tool(
177
192
  report_name=report_name,
178
193
  page_size=page_size,
179
194
  search_string=search_string
180
195
  )
181
196
 
182
- # Delegate to the run_report_tool with the extracted parameters
183
- return run_report_tool(
197
+ # AWAIT the async function call
198
+ return await run_report_tool(
184
199
  report_name=report_name,
185
200
  page_size=page_size
186
201
  )
187
- # Fallback: Just confirm the prompt was received.
202
+
188
203
  return {
189
204
  "response": f"Acknowledged natural language query: '{prompt}'. This would be sent to an LLM."
190
205
  }
@@ -15,14 +15,14 @@ from rich import print
15
15
  from rich.console import Console
16
16
  from rich.markdown import Markdown
17
17
 
18
- from pyegeria import body_slimmer
18
+ from pyegeria.utils import body_slimmer
19
19
  from pyegeria._globals import (NO_GLOSSARIES_FOUND, NO_ELEMENTS_FOUND, NO_PROJECTS_FOUND, NO_CATEGORIES_FOUND, DEBUG_LEVEL)
20
20
  from pyegeria.egeria_tech_client import EgeriaTech
21
- from md_processing.md_processing_utils.md_processing_constants import (message_types,
21
+ from md_processing.md_processing_utils.md_processing_constants import (
22
22
  pre_command, EXISTS_REQUIRED, load_commands, get_command_spec, get_attribute, get_attribute_labels, get_alternate_names)
23
23
 
24
24
 
25
- from pyegeria.project_manager_omvs import ProjectManager
25
+ from pyegeria.project_manager import ProjectManager
26
26
 
27
27
  ALWAYS = "ALWAYS"
28
28
  ERROR = "ERROR"
@@ -17,11 +17,11 @@ from rich import box, print
17
17
  from rich.console import Console
18
18
  from rich.markdown import Markdown
19
19
 
20
- from pyegeria import body_slimmer
20
+ from pyegeria.utils import body_slimmer
21
21
  from pyegeria._globals import NO_TERMS_FOUND, NO_GLOSSARIES_FOUND, NO_TERMS_FOUND, NO_ELEMENTS_FOUND, NO_PROJECTS_FOUND, NO_CATEGORIES_FOUND
22
22
  from pyegeria.egeria_tech_client import EgeriaTech
23
- from pyegeria.project_manager_omvs import ProjectManager
24
- from pyegeria.glossary_manager_omvs import GlossaryManager
23
+ from pyegeria.project_manager import ProjectManager
24
+ from pyegeria.glossary_manager import GlossaryManager
25
25
 
26
26
  from datetime import datetime
27
27
  EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
@@ -21,14 +21,6 @@ nest_asyncio.apply()
21
21
  from IPython.display import HTML, display
22
22
  from rich.console import Console
23
23
 
24
- from pyegeria.automated_curation import AutomatedCuration
25
- from pyegeria._exceptions import (
26
- InvalidParameterException,
27
- PropertyServerException,
28
- UserNotAuthorizedException,
29
- )
30
- from pyegeria._globals import NO_ELEMENTS_FOUND
31
-
32
24
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
33
25
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
34
26
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
@@ -1252,147 +1244,3 @@ def save_mermaid_graph(title, mermaid_str, folder: str = EGERIA_MERMAID_FOLDER):
1252
1244
  return mermaid_file
1253
1245
 
1254
1246
 
1255
- def generate_process_graph(
1256
- process_guid: str,
1257
- view_server: str = EGERIA_VIEW_SERVER,
1258
- url: str = EGERIA_VIEW_SERVER_URL,
1259
- user_id: str = EGERIA_USER,
1260
- user_pass: str = EGERIA_USER_PASSWORD,
1261
- ) -> str:
1262
- """Generate Mermaid Markdown text reflecting the Egeria process graph identified by the GUID
1263
-
1264
- Parameters
1265
- ----------
1266
- process_guid: str
1267
- The identity of the progress to generate a graph of.
1268
-
1269
- Returns
1270
- -------
1271
- str
1272
-
1273
- A Mermaid markdown string
1274
-
1275
- Raises
1276
- ------
1277
-
1278
- InvalidParameterException
1279
- If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1280
- PropertyServerException
1281
- Raised by the server when an issue arises in processing a valid request
1282
- NotAuthorizedException
1283
- The principle specified by the user_id does not have authorization for the requested action
1284
-
1285
- """
1286
- console = Console()
1287
- a_client = AutomatedCuration(view_server, url, user_id, user_pass)
1288
- token = a_client.create_egeria_bearer_token()
1289
- try:
1290
- start_time = time.perf_counter()
1291
- response = a_client.get_gov_action_process_graph(process_guid)
1292
- duration = time.perf_counter() - start_time
1293
-
1294
- if type(response) is dict:
1295
- process_steps: [dict]
1296
- step_links: [dict] = []
1297
- gov_process_qn = response["governanceActionProcess"]["processProperties"][
1298
- "qualifiedName"
1299
- ]
1300
- gov_process_dn = response["governanceActionProcess"]["processProperties"][
1301
- "displayName"
1302
- ]
1303
-
1304
- md = f"\n---\ntitle: {gov_process_dn}\n---\nflowchart LR\n"
1305
- header = '%%{init: {"flowchart": {"htmlLabels": false}} }%%\n'
1306
- md += header
1307
- element = response["firstProcessStep"]["element"]
1308
- qname = element["processStepProperties"]["qualifiedName"]
1309
- dname = element["processStepProperties"]["displayName"]
1310
- domain_id = element["processStepProperties"]["domainIdentifier"]
1311
- guid = element["elementHeader"]["guid"]
1312
- wait = element["processStepProperties"]["waitTime"]
1313
- ignore_mult_trig = element["processStepProperties"][
1314
- "ignoreMultipleTriggers"
1315
- ]
1316
- link = response["firstProcessStep"]["linkGUID"]
1317
-
1318
- md = f'{md}\nStep1("`**{dname}**\n*nwait_time*: {wait}\n*nmult_trig*: {ignore_mult_trig}`")'
1319
- process_steps = {
1320
- qname: {
1321
- "step": "Step1",
1322
- "displayName": dname,
1323
- "guid": guid,
1324
- "domain": domain_id,
1325
- "ignoreMultTrig": ignore_mult_trig,
1326
- "waitTime": wait,
1327
- "link_guid": link,
1328
- }
1329
- }
1330
- next_steps = response.get("nextProcessSteps", None)
1331
- if next_steps is not None:
1332
- i = 1
1333
- for step in next_steps:
1334
- i += 1
1335
- qname = step["processStepProperties"]["qualifiedName"]
1336
- dname = step["processStepProperties"]["displayName"]
1337
- wait = step["processStepProperties"]["waitTime"]
1338
- step = f"Step{i}"
1339
- md = f'{md}\n{step}("`**{dname}**\n*wait_time*: {wait}\n*mult_trig*: {ignore_mult_trig}`")'
1340
- process_steps.update(
1341
- {
1342
- qname: {
1343
- "step": step,
1344
- "displayName": dname,
1345
- "guid": guid,
1346
- "domain": domain_id,
1347
- "ignoreMultTrig": ignore_mult_trig,
1348
- "waitTime": wait,
1349
- }
1350
- }
1351
- ) # process_steps.append({qname: {"step": step,"displayName": dname, "waitTime": wait}})
1352
- # print(md)
1353
- # Now process the links
1354
- process_step_links = response.get("processStepLinks", None)
1355
- if process_step_links is not None:
1356
- for slink in process_step_links:
1357
- prev_step_name = slink["previousProcessStep"]["uniqueName"]
1358
- next_step_name = slink["nextProcessStep"]["uniqueName"]
1359
- next_step_link_guid = slink["nextProcessStepLinkGUID"]
1360
- guard = slink["guard"]
1361
- mandatory_guard = slink["mandatoryGuard"]
1362
- # print(f"\n\n Links: prev_step: {prev_step_name}\t next_step: {next_step_name}\t next_step_link:
1363
- # {next_step_link_guid}\t Guard: {guard}\t mandatory_guard: {mandatory_guard}")
1364
- step_links.append(
1365
- {
1366
- next_step_link_guid: {
1367
- "prev_step_name": prev_step_name,
1368
- "next_step_name": next_step_name,
1369
- "guard": guard,
1370
- "mandatory_guard": mandatory_guard,
1371
- }
1372
- }
1373
- )
1374
- step_p = process_steps[prev_step_name]["step"]
1375
- step_n = process_steps[next_step_name]["step"]
1376
- if mandatory_guard:
1377
- link = f"Mandatory:{guard}"
1378
- else:
1379
- link = guard
1380
- md = f"{md}\n{step_p}-->|{link}|{step_n}"
1381
- i = 1
1382
-
1383
- return md
1384
-
1385
- elif type(response) is str:
1386
- console.log("\n\n" + response)
1387
- assert True
1388
-
1389
- except (
1390
- InvalidParameterException,
1391
- PropertyServerException,
1392
- UserNotAuthorizedException,
1393
- ) as e:
1394
- console.print_exception(show_locals=True)
1395
- assert False, "Invalid request"
1396
-
1397
- finally:
1398
- a_client.close_session()
pyegeria/models.py CHANGED
@@ -378,6 +378,11 @@ class ResultsRequestBody(GetRequestBody):
378
378
  start_from: int = 0
379
379
  page_size: int = 0
380
380
 
381
+ class LevelIdentifierQueryBody(ResultsRequestBody):
382
+ class_: Annotated[Literal["LevelIdentifierQueryProperties"], Field(alias="class")]
383
+ return_specific_level: bool = True
384
+ level_identifier: int
385
+
381
386
  class FilterRequestBody(ResultsRequestBody):
382
387
  class_: Annotated[Literal["FilterRequestBody"], Field(alias="class")]
383
388
  filter: str
@@ -8,7 +8,7 @@ from loguru import logger
8
8
  from pyegeria.config import settings
9
9
 
10
10
  from pyegeria.mermaid_utilities import construct_mermaid_web
11
- from pyegeria._output_formats import select_output_format_set, MD_SEPARATOR
11
+ from pyegeria._output_formats import select_output_format_set, MD_SEPARATOR, get_output_format_type_match
12
12
  from pyegeria.models import to_camel_case
13
13
 
14
14
  """
@@ -157,6 +157,10 @@ class ProjectManager(Client2):
157
157
  The identity of the parent to find linked projects from.
158
158
  project_status: str, optional
159
159
  Optionally, filter results by project status.
160
+ output_format: str, default = "JSON"
161
+ - Type of output to return.
162
+ output_format_set: dict | str, default = None
163
+ - Output format set to use. If None, the default output format set is used.
160
164
 
161
165
  start_from: int, [default=0], optional
162
166
  When multiple pages of results are available, the page number to start from.
@@ -211,6 +215,10 @@ class ProjectManager(Client2):
211
215
  Optionally, filter results by project status.
212
216
  effective_time: str, optional
213
217
  Time at which to query for projects. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
218
+ output_format: str, default = "JSON"
219
+ - Type of output to return.
220
+ output_format_set: dict | str, default = None
221
+ - Output format set to use. If None, the default output format set is used.
214
222
 
215
223
  start_from: int, [default=0], optional
216
224
  When multiple pages of results are available, the page number to start from.
@@ -164,6 +164,10 @@ class ReferenceDataManager(Client2):
164
164
  Search string to use to find matching projects. If the search string is '*' then all projects returned.
165
165
  effective_time: str, [default=None], optional
166
166
  Effective time of the query. If not specified will default to any time.
167
+ output_format: str, default = "JSON"
168
+ - Type of output to return.
169
+ output_format_set: dict | str, default = None
170
+ - Output format set to use. If None, the default output format set is used.
167
171
 
168
172
  starts_with : bool, [default=False], optional
169
173
  Starts with the supplied string.
@@ -11,7 +11,7 @@ import asyncio
11
11
  from requests import Response
12
12
  from pyegeria.utils import body_slimmer
13
13
  from pyegeria._client_new import Client2
14
- from pyegeria import TEMPLATE_GUIDS, max_paging_size,default_time_out
14
+ from pyegeria._globals import TEMPLATE_GUIDS, max_paging_size,default_time_out
15
15
  from pyegeria._exceptions_new import PyegeriaInvalidParameterException
16
16
  from pyegeria._globals import NO_ELEMENTS_FOUND
17
17
 
@@ -19,7 +19,7 @@ from pyegeria.models import NewElementRequestBody, TemplateRequestBody, UpdateEl
19
19
  from pyegeria.output_formatter import make_preamble, make_md_attribute, generate_output, extract_mermaid_only, \
20
20
  extract_basic_dict, MD_SEPARATOR, populate_common_columns
21
21
  from pyegeria._output_formats import select_output_format_set, get_output_format_type_match
22
- from pyegeria import validate_guid
22
+ from pyegeria._validators import validate_guid
23
23
  from pyegeria.governance_officer import GovernanceOfficer
24
24
  from pyegeria._client_new import Client2, max_paging_size
25
25
  from pyegeria._globals import NO_ELEMENTS_FOUND, NO_GUID_RETURNED
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyegeria
3
- Version: 5.4.7.3
3
+ Version: 5.4.7.5
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