pyegeria 0.8.4.32__tar.gz → 0.8.4.33__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.33}/PKG-INFO +2 -1
  2. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/core_omag_server_config.py +37 -6
  3. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyproject.toml +2 -1
  4. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/LICENSE +0 -0
  5. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/README.md +0 -0
  6. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/README.md +0 -0
  7. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/__init__.py +0 -0
  8. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/get_asset_graph.py +0 -0
  9. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/get_collection.py +0 -0
  10. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/get_project_dependencies.py +0 -0
  11. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/get_project_structure.py +0 -0
  12. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/get_tech_type_elements.py +0 -0
  13. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/get_tech_type_template.py +0 -0
  14. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/list_archives.py +0 -0
  15. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/list_assets.py +0 -0
  16. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/list_cert_types.py +0 -0
  17. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/list_glossary.py +0 -0
  18. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/list_projects.py +0 -0
  19. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/list_relationships.py +0 -0
  20. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/list_tech_types.py +0 -0
  21. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/list_todos.py +0 -0
  22. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cat/list_user_ids.py +0 -0
  23. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cli/__init__.py +0 -0
  24. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cli/egeria.py +0 -0
  25. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cli/egeria_cat.py +0 -0
  26. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cli/egeria_my.py +0 -0
  27. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cli/egeria_ops.py +0 -0
  28. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cli/egeria_tech.py +0 -0
  29. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/cli/ops_config.py +0 -0
  30. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/my/README.md +0 -0
  31. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/my/__init__.py +0 -0
  32. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/my/list_my_profile.py +0 -0
  33. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/my/list_my_roles.py +0 -0
  34. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/my/monitor_my_todos.py +0 -0
  35. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/my/monitor_open_todos.py +0 -0
  36. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/my/todo_actions.py +0 -0
  37. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/README.md +0 -0
  38. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/__init__.py +0 -0
  39. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/engine_actions.py +0 -0
  40. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/gov_server_actions.py +0 -0
  41. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/list_catalog_targets.py +0 -0
  42. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/load_archive.py +0 -0
  43. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/monitor_asset_events.py +0 -0
  44. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/monitor_engine_activity.py +0 -0
  45. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/monitor_engine_activity_c.py +0 -0
  46. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/monitor_gov_eng_status.py +0 -0
  47. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/monitor_integ_daemon_status.py +0 -0
  48. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/monitor_platform_status.py +0 -0
  49. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/monitor_server_status.py +0 -0
  50. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/orig_monitor_server_list.py +0 -0
  51. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/orig_monitor_server_status.py +0 -0
  52. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/refresh_integration_daemon.py +0 -0
  53. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/ops/restart_integration_daemon.py +0 -0
  54. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/README.md +0 -0
  55. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/__init__.py +0 -0
  56. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/get_element_info.py +0 -0
  57. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/get_guid_info.py +0 -0
  58. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/get_tech_details.py +0 -0
  59. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/list_asset_types.py +0 -0
  60. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/list_elements.py +0 -0
  61. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/list_elements_x.py +0 -0
  62. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/list_registered_services.py +0 -0
  63. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/list_related_specification.py +0 -0
  64. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/list_relationship_types.py +0 -0
  65. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/list_tech_templates.py +0 -0
  66. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/list_valid_metadata_values.py +0 -0
  67. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/commands/tech/x_list_related_elements.py +0 -0
  68. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/__init__.py +0 -0
  69. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/_client.py +0 -0
  70. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/_deprecated_gov_engine.py +0 -0
  71. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/_exceptions.py +0 -0
  72. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/_globals.py +0 -0
  73. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/_validators.py +0 -0
  74. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/asset_catalog_omvs.py +0 -0
  75. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/automated_curation_omvs.py +0 -0
  76. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/classification_manager_omvs.py +0 -0
  77. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/collection_manager_omvs.py +0 -0
  78. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/create_tech_guid_lists.py +0 -0
  79. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/egeria_cat_client.py +0 -0
  80. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/egeria_client.py +0 -0
  81. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/egeria_config_client.py +0 -0
  82. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/egeria_my_client.py +0 -0
  83. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/egeria_tech_client.py +0 -0
  84. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/feedback_manager_omvs.py +0 -0
  85. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/full_omag_server_config.py +0 -0
  86. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/glossary_browser_omvs.py +0 -0
  87. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/glossary_manager_omvs.py +0 -0
  88. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/mermaid_utilities.py +0 -0
  89. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/my_profile_omvs.py +0 -0
  90. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/platform_services.py +0 -0
  91. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/project_manager_omvs.py +0 -0
  92. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/registered_info.py +0 -0
  93. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/runtime_manager_omvs.py +0 -0
  94. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/server_operations.py +0 -0
  95. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/utils.py +0 -0
  96. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/pyegeria/valid_metadata_omvs.py +0 -0
  97. {pyegeria-0.8.4.32 → pyegeria-0.8.4.33}/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.33
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
 
@@ -1384,9 +1390,34 @@ class CoreServerConfig(Client):
1384
1390
  validate_name(host)
1385
1391
  pg_db = server_name.lower()
1386
1392
 
1387
- jdbc_url = (
1388
- f'"jdbc:postgresql://{host}/{pg_db}?user={pg_user}&password={pg_pwd}"'
1393
+ # Connect to the PostgreSQL server
1394
+ conn = psycopg2.connect(
1395
+ host=host,
1396
+ port=port,
1397
+ user=pg_user,
1398
+ password=pg_pwd,
1399
+ dbname="postgres", # Connect to the default 'postgres' database to perform operations
1389
1400
  )
1401
+ conn.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT) # Enable autocommit mode
1402
+
1403
+ cursor = conn.cursor()
1404
+
1405
+ # Check if database exists
1406
+ cursor.execute(sql.SQL("SELECT 1 FROM pg_database WHERE datname = %s"), [pg_db])
1407
+ database_exists = cursor.fetchone()
1408
+
1409
+ # If the database does not exist, create it
1410
+ if not database_exists:
1411
+ cursor.execute(sql.SQL("CREATE DATABASE {}").format(sql.Identifier(pg_db)))
1412
+ print(f"Database '{pg_db}' created.")
1413
+ else:
1414
+ print(f"Database '{pg_db}' already exists.")
1415
+
1416
+ # Close the connection to the server
1417
+ cursor.close()
1418
+ conn.close()
1419
+
1420
+ jdbc_url = f'"jdbc:postgresql://{host}:{port}/{pg_db}?user={pg_user}&password={pg_pwd}"'
1390
1421
  index_dir = f'"data/servers/{server_name}/repository/xtdb/rdb-index"'
1391
1422
  lucene_dir = f'"data/servers/{server_name}/repository/xtdb/lucene"'
1392
1423
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyegeria"
3
- version = "0.8.4.32"
3
+ version = "0.8.4.33"
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