pyegeria 0.8.4.32__tar.gz → 0.8.4.34__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 (97) hide show
  1. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/PKG-INFO +2 -1
  2. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/core_omag_server_config.py +40 -8
  3. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyproject.toml +2 -1
  4. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/LICENSE +0 -0
  5. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/README.md +0 -0
  6. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/README.md +0 -0
  7. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/__init__.py +0 -0
  8. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/get_asset_graph.py +0 -0
  9. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/get_collection.py +0 -0
  10. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/get_project_dependencies.py +0 -0
  11. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/get_project_structure.py +0 -0
  12. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/get_tech_type_elements.py +0 -0
  13. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/get_tech_type_template.py +0 -0
  14. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/list_archives.py +0 -0
  15. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/list_assets.py +0 -0
  16. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/list_cert_types.py +0 -0
  17. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/list_glossary.py +0 -0
  18. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/list_projects.py +0 -0
  19. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/list_relationships.py +0 -0
  20. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/list_tech_types.py +0 -0
  21. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/list_todos.py +0 -0
  22. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cat/list_user_ids.py +0 -0
  23. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cli/__init__.py +0 -0
  24. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cli/egeria.py +0 -0
  25. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cli/egeria_cat.py +0 -0
  26. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cli/egeria_my.py +0 -0
  27. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cli/egeria_ops.py +0 -0
  28. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cli/egeria_tech.py +0 -0
  29. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/cli/ops_config.py +0 -0
  30. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/my/README.md +0 -0
  31. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/my/__init__.py +0 -0
  32. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/my/list_my_profile.py +0 -0
  33. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/my/list_my_roles.py +0 -0
  34. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/my/monitor_my_todos.py +0 -0
  35. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/my/monitor_open_todos.py +0 -0
  36. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/my/todo_actions.py +0 -0
  37. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/README.md +0 -0
  38. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/__init__.py +0 -0
  39. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/engine_actions.py +0 -0
  40. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/gov_server_actions.py +0 -0
  41. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/list_catalog_targets.py +0 -0
  42. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/load_archive.py +0 -0
  43. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/monitor_asset_events.py +0 -0
  44. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/monitor_engine_activity.py +0 -0
  45. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/monitor_engine_activity_c.py +0 -0
  46. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/monitor_gov_eng_status.py +0 -0
  47. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/monitor_integ_daemon_status.py +0 -0
  48. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/monitor_platform_status.py +0 -0
  49. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/monitor_server_status.py +0 -0
  50. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/orig_monitor_server_list.py +0 -0
  51. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/orig_monitor_server_status.py +0 -0
  52. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/refresh_integration_daemon.py +0 -0
  53. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/ops/restart_integration_daemon.py +0 -0
  54. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/README.md +0 -0
  55. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/__init__.py +0 -0
  56. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/get_element_info.py +0 -0
  57. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/get_guid_info.py +0 -0
  58. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/get_tech_details.py +0 -0
  59. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/list_asset_types.py +0 -0
  60. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/list_elements.py +0 -0
  61. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/list_elements_x.py +0 -0
  62. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/list_registered_services.py +0 -0
  63. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/list_related_specification.py +0 -0
  64. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/list_relationship_types.py +0 -0
  65. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/list_tech_templates.py +0 -0
  66. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/list_valid_metadata_values.py +0 -0
  67. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/commands/tech/x_list_related_elements.py +0 -0
  68. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/__init__.py +0 -0
  69. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/_client.py +0 -0
  70. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/_deprecated_gov_engine.py +0 -0
  71. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/_exceptions.py +0 -0
  72. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/_globals.py +0 -0
  73. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/_validators.py +0 -0
  74. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/asset_catalog_omvs.py +0 -0
  75. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/automated_curation_omvs.py +0 -0
  76. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/classification_manager_omvs.py +0 -0
  77. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/collection_manager_omvs.py +0 -0
  78. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/create_tech_guid_lists.py +0 -0
  79. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/egeria_cat_client.py +0 -0
  80. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/egeria_client.py +0 -0
  81. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/egeria_config_client.py +0 -0
  82. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/egeria_my_client.py +0 -0
  83. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/egeria_tech_client.py +0 -0
  84. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/feedback_manager_omvs.py +0 -0
  85. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/full_omag_server_config.py +0 -0
  86. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/glossary_browser_omvs.py +0 -0
  87. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/glossary_manager_omvs.py +0 -0
  88. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/mermaid_utilities.py +0 -0
  89. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/my_profile_omvs.py +0 -0
  90. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/platform_services.py +0 -0
  91. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/project_manager_omvs.py +0 -0
  92. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/registered_info.py +0 -0
  93. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/runtime_manager_omvs.py +0 -0
  94. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/server_operations.py +0 -0
  95. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/utils.py +0 -0
  96. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/valid_metadata_omvs.py +0 -0
  97. {pyegeria-0.8.4.32 → pyegeria-0.8.4.34}/pyegeria/x_action_author_omvs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.8.4.32
3
+ Version: 0.8.4.34
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -19,6 +19,7 @@ Requires-Dist: confluent-kafka (>=2.5.0,<3.0.0)
19
19
  Requires-Dist: httpx (>=0.27.0,<0.28.0)
20
20
  Requires-Dist: jupyter (>=1.0.0,<2.0.0)
21
21
  Requires-Dist: mermaid-py (>=0.5.3,<0.6.0)
22
+ Requires-Dist: psycopg2-binary (>=2.9.9,<3.0.0)
22
23
  Requires-Dist: pytest (>=8.2.2,<9.0.0)
23
24
  Requires-Dist: requests (>=2.32.3,<3.0.0)
24
25
  Requires-Dist: rich (>=13.8.1,<14.0.0)
@@ -10,6 +10,9 @@ deployed to take effect.
10
10
  """
11
11
 
12
12
  import json
13
+ import psycopg2
14
+ from psycopg2 import sql
15
+ from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
13
16
 
14
17
  # import json
15
18
  from pyegeria._client import Client
@@ -1340,15 +1343,18 @@ class CoreServerConfig(Client):
1340
1343
  self.make_request("POST", url, xtdb_config_body)
1341
1344
 
1342
1345
  def set_xtdb_pg_repository(
1343
- self, host: str, pg_user: str, pg_pwd: str, server_name: str = None
1346
+ self, host: str, port: str, pg_user: str, pg_pwd: str, server_name: str = None
1344
1347
  ) -> None:
1345
- """Set the local repository connection to be XTDB using PostgresSQL Server, passing in basic parameters
1348
+ """Set the local repository connection to be XTDB using PostgresSQL Server, passing in basic parameters.
1349
+ A postgres database with the name of the metadata server will be created if it doesn't exist.
1350
+
1346
1351
 
1347
1352
  Parameters
1348
1353
  ----------
1349
1354
  host : str
1350
- the full hostname and port of the postgres server
1351
-
1355
+ the full hostname of the postgres server
1356
+ port: str
1357
+ the port number of the postgres server
1352
1358
  pg_user : str
1353
1359
  postgresql user name
1354
1360
 
@@ -1379,16 +1385,42 @@ class CoreServerConfig(Client):
1379
1385
  """
1380
1386
  if server_name is None:
1381
1387
  server_name = self.server_name
1388
+
1382
1389
  validate_name(pg_pwd)
1383
1390
  validate_name(pg_user)
1384
1391
  validate_name(host)
1385
1392
  pg_db = server_name.lower()
1386
1393
 
1387
- jdbc_url = (
1388
- f'"jdbc:postgresql://{host}/{pg_db}?user={pg_user}&password={pg_pwd}"'
1394
+ # Connect to the PostgreSQL server
1395
+ conn = psycopg2.connect(
1396
+ host=host,
1397
+ port=port,
1398
+ user=pg_user,
1399
+ password=pg_pwd,
1400
+ dbname="postgres", # Connect to the default 'postgres' database to perform operations
1389
1401
  )
1390
- index_dir = f'"data/servers/{server_name}/repository/xtdb/rdb-index"'
1391
- lucene_dir = f'"data/servers/{server_name}/repository/xtdb/lucene"'
1402
+ conn.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT) # Enable autocommit mode
1403
+
1404
+ cursor = conn.cursor()
1405
+
1406
+ # Check if database exists
1407
+ cursor.execute(sql.SQL("SELECT 1 FROM pg_database WHERE datname = %s"), [pg_db])
1408
+ database_exists = cursor.fetchone()
1409
+
1410
+ # If the database does not exist, create it
1411
+ if not database_exists:
1412
+ cursor.execute(sql.SQL("CREATE DATABASE {}").format(sql.Identifier(pg_db)))
1413
+ print(f"Database '{pg_db}' created.")
1414
+ else:
1415
+ print(f"Database '{pg_db}' already exists.")
1416
+
1417
+ # Close the connection to the server
1418
+ cursor.close()
1419
+ conn.close()
1420
+
1421
+ jdbc_url = f'"jdbc:postgresql://{host}:{port}/{pg_db}?user={pg_user}&password={pg_pwd}"'
1422
+ index_dir = f'"data/servers/{server_name}/repository/{pg_db}/rdb-index"'
1423
+ lucene_dir = f'"data/servers/{server_name}/repository/{pg_db}/lucene"'
1392
1424
 
1393
1425
  index_str = "{:xtdb/index-store {:kv-store {:xtdb/module xtdb.rocksdb/->kv-store :db-dir "
1394
1426
  index_str2 = index_str + index_dir + "}}"
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyegeria"
3
- version = "0.8.4.32"
3
+ version = "0.8.4.34"
4
4
  license = 'Apache 2.0'
5
5
  authors = ["Dan Wolfson <dan.wolfson@pdr-associates.com>"]
6
6
  readme = "README.md"
@@ -38,6 +38,7 @@ trogon = "^0.5.0"
38
38
  textual-forms = "^0.3.0"
39
39
  textual = "^0.75.1"
40
40
  mermaid-py = "^0.5.3"
41
+ psycopg2-binary = "^2.9.9"
41
42
 
42
43
  [build-system]
43
44
  requires = ["poetry-core"]
File without changes
File without changes