From 227d57be795d67bc186bf2daa1a8bedde9ce1c04 Mon Sep 17 00:00:00 2001 From: Ant Date: Wed, 8 Mar 2023 14:18:10 -0500 Subject: [PATCH] Remove API examples --- .../Data_Source_Management/addDataSource.py | 41 ---------------- .../deleteDataSource.py | 40 --------------- .../Data_Source_Management/listDataSources.py | 32 ------------ .../Config_Management/addConfig.py | 25 ---------- .../Config_Management/getConfig.py | 21 -------- .../Config_Management/getConfigList.py | 19 ------- .../Config_Management/getDefaultConfigID.py | 19 ------- .../replaceDefaultConfigID.py | 20 -------- .../Config_Management/setDefaultConfigID.py | 19 ------- .../G2Engine/Data_Manipulation/addRecord.py | 31 ------------ .../Data_Manipulation/addRecordWithInfo.py | 32 ------------ .../addRecordWithInfoReturnedRecordID.py | 32 ------------ .../addRecordWithReturnedRecordID.py | 33 ------------- .../Data_Manipulation/deleteRecord.py | 18 ------- .../Data_Manipulation/deleteRecordWithInfo.py | 21 -------- .../Data_Manipulation/replaceRecord.py | 32 ------------ .../replaceRecordWithInfo.py | 33 ------------- .../APIs/G2Engine/Engine_Info/exportConfig.py | 21 -------- .../G2Engine/Engine_Info/getActiveConfigID.py | 19 ------- .../getRepositoryLastModifiedTime.py | 21 -------- Python/APIs/G2Engine/Engine_Info/stats.py | 30 ------------ .../Find_Path/findNetworkByEntityID.py | 24 --------- .../Find_Path/findNetworkByRecordID.py | 32 ------------ .../G2Engine/Find_Path/findPathByEntityID.py | 19 ------- .../G2Engine/Find_Path/findPathByRecordID.py | 19 ------- .../Find_Path/findPathExcludingByEntityID.py | 24 --------- .../Find_Path/findPathExcludingByRecordID.py | 26 ---------- .../findPathIncludingSourceByEntityID.py | 25 ---------- .../findPathIncludingSourceByRecordID.py | 27 ---------- .../APIs/G2Engine/Get/getEntityByEntityID.py | 19 ------- .../APIs/G2Engine/Get/getEntityByRecordID.py | 19 ------- Python/APIs/G2Engine/Get/getRecord.py | 19 ------- .../APIs/G2Engine/How/howEntityByEntityID.py | 19 ------- .../APIs/G2Engine/Object_Management/init.py | 18 ------- .../Object_Management/initWithConfigID.py | 18 ------- .../G2Engine/Object_Management/primeEngine.py | 20 -------- .../APIs/G2Engine/Object_Management/reinit.py | 43 ---------------- Python/APIs/G2Engine/Purge/purgeRepository.py | 18 ------- Python/APIs/G2Engine/Redo/countRedoRecords.py | 16 ------ Python/APIs/G2Engine/Redo/getRedoRecord.py | 23 --------- Python/APIs/G2Engine/Redo/process.py | 23 --------- .../APIs/G2Engine/Redo/processRedoRecord.py | 23 --------- .../Redo/processRedoRecordWithInfo.py | 24 --------- Python/APIs/G2Engine/Redo/processWithInfo.py | 25 ---------- .../G2Engine/Reevaluation/reevaluateEntity.py | 18 ------- .../Reevaluation/reevaluateEntityWithInfo.py | 19 ------- .../G2Engine/Reevaluation/reevaluateRecord.py | 18 ------- .../Reevaluation/reevaluateRecordWithInfo.py | 19 ------- .../Reporting/exportCSVEntityReport.py | 49 ------------------- .../Reporting/exportJSONEntityReport.py | 48 ------------------ .../G2Engine/Search/searchByAttributes.py | 20 -------- Python/APIs/G2Engine/Why/whyEntities.py | 19 ------- .../APIs/G2Engine/Why/whyEntityByEntityID.py | 19 ------- .../APIs/G2Engine/Why/whyEntityByRecordID.py | 19 ------- Python/APIs/G2Engine/Why/whyRecords.py | 19 ------- Python/APIs/G2Engine/_getVirtualEntityBy... | 0 Python/APIs/G2Product/License_Info/license.py | 16 ------ .../License_Info/validateLicenseFile.py | 24 --------- .../validateLicenseStringBase64.py | 27 ---------- Python/APIs/G2Product/Version/version.py | 18 ------- Python/APIs/README.md | 2 +- 61 files changed, 1 insertion(+), 1435 deletions(-) delete mode 100755 Python/APIs/G2Config/Data_Source_Management/addDataSource.py delete mode 100755 Python/APIs/G2Config/Data_Source_Management/deleteDataSource.py delete mode 100755 Python/APIs/G2Config/Data_Source_Management/listDataSources.py delete mode 100755 Python/APIs/G2ConfigMgr/Config_Management/addConfig.py delete mode 100755 Python/APIs/G2ConfigMgr/Config_Management/getConfig.py delete mode 100755 Python/APIs/G2ConfigMgr/Config_Management/getConfigList.py delete mode 100755 Python/APIs/G2ConfigMgr/Config_Management/getDefaultConfigID.py delete mode 100755 Python/APIs/G2ConfigMgr/Config_Management/replaceDefaultConfigID.py delete mode 100755 Python/APIs/G2ConfigMgr/Config_Management/setDefaultConfigID.py delete mode 100755 Python/APIs/G2Engine/Data_Manipulation/addRecord.py delete mode 100755 Python/APIs/G2Engine/Data_Manipulation/addRecordWithInfo.py delete mode 100755 Python/APIs/G2Engine/Data_Manipulation/addRecordWithInfoReturnedRecordID.py delete mode 100755 Python/APIs/G2Engine/Data_Manipulation/addRecordWithReturnedRecordID.py delete mode 100755 Python/APIs/G2Engine/Data_Manipulation/deleteRecord.py delete mode 100755 Python/APIs/G2Engine/Data_Manipulation/deleteRecordWithInfo.py delete mode 100755 Python/APIs/G2Engine/Data_Manipulation/replaceRecord.py delete mode 100755 Python/APIs/G2Engine/Data_Manipulation/replaceRecordWithInfo.py delete mode 100755 Python/APIs/G2Engine/Engine_Info/exportConfig.py delete mode 100755 Python/APIs/G2Engine/Engine_Info/getActiveConfigID.py delete mode 100755 Python/APIs/G2Engine/Engine_Info/getRepositoryLastModifiedTime.py delete mode 100755 Python/APIs/G2Engine/Engine_Info/stats.py delete mode 100755 Python/APIs/G2Engine/Find_Path/findNetworkByEntityID.py delete mode 100755 Python/APIs/G2Engine/Find_Path/findNetworkByRecordID.py delete mode 100755 Python/APIs/G2Engine/Find_Path/findPathByEntityID.py delete mode 100755 Python/APIs/G2Engine/Find_Path/findPathByRecordID.py delete mode 100755 Python/APIs/G2Engine/Find_Path/findPathExcludingByEntityID.py delete mode 100755 Python/APIs/G2Engine/Find_Path/findPathExcludingByRecordID.py delete mode 100755 Python/APIs/G2Engine/Find_Path/findPathIncludingSourceByEntityID.py delete mode 100755 Python/APIs/G2Engine/Find_Path/findPathIncludingSourceByRecordID.py delete mode 100755 Python/APIs/G2Engine/Get/getEntityByEntityID.py delete mode 100755 Python/APIs/G2Engine/Get/getEntityByRecordID.py delete mode 100755 Python/APIs/G2Engine/Get/getRecord.py delete mode 100755 Python/APIs/G2Engine/How/howEntityByEntityID.py delete mode 100755 Python/APIs/G2Engine/Object_Management/init.py delete mode 100755 Python/APIs/G2Engine/Object_Management/initWithConfigID.py delete mode 100755 Python/APIs/G2Engine/Object_Management/primeEngine.py delete mode 100755 Python/APIs/G2Engine/Object_Management/reinit.py delete mode 100755 Python/APIs/G2Engine/Purge/purgeRepository.py delete mode 100755 Python/APIs/G2Engine/Redo/countRedoRecords.py delete mode 100755 Python/APIs/G2Engine/Redo/getRedoRecord.py delete mode 100755 Python/APIs/G2Engine/Redo/process.py delete mode 100755 Python/APIs/G2Engine/Redo/processRedoRecord.py delete mode 100755 Python/APIs/G2Engine/Redo/processRedoRecordWithInfo.py delete mode 100755 Python/APIs/G2Engine/Redo/processWithInfo.py delete mode 100755 Python/APIs/G2Engine/Reevaluation/reevaluateEntity.py delete mode 100755 Python/APIs/G2Engine/Reevaluation/reevaluateEntityWithInfo.py delete mode 100755 Python/APIs/G2Engine/Reevaluation/reevaluateRecord.py delete mode 100755 Python/APIs/G2Engine/Reevaluation/reevaluateRecordWithInfo.py delete mode 100755 Python/APIs/G2Engine/Reporting/exportCSVEntityReport.py delete mode 100755 Python/APIs/G2Engine/Reporting/exportJSONEntityReport.py delete mode 100755 Python/APIs/G2Engine/Search/searchByAttributes.py delete mode 100755 Python/APIs/G2Engine/Why/whyEntities.py delete mode 100755 Python/APIs/G2Engine/Why/whyEntityByEntityID.py delete mode 100755 Python/APIs/G2Engine/Why/whyEntityByRecordID.py delete mode 100755 Python/APIs/G2Engine/Why/whyRecords.py delete mode 100644 Python/APIs/G2Engine/_getVirtualEntityBy... delete mode 100755 Python/APIs/G2Product/License_Info/license.py delete mode 100755 Python/APIs/G2Product/License_Info/validateLicenseFile.py delete mode 100755 Python/APIs/G2Product/License_Info/validateLicenseStringBase64.py delete mode 100755 Python/APIs/G2Product/Version/version.py diff --git a/Python/APIs/G2Config/Data_Source_Management/addDataSource.py b/Python/APIs/G2Config/Data_Source_Management/addDataSource.py deleted file mode 100755 index 418c6f8..0000000 --- a/Python/APIs/G2Config/Data_Source_Management/addDataSource.py +++ /dev/null @@ -1,41 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2Config, G2ConfigMgr, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -add_response = bytearray() -current_config = bytearray() -current_config_id = bytearray() -new_config = bytearray() -new_config_id = bytearray() - -try: - g2_config = G2Config() - g2_config_mgr = G2ConfigMgr() - - g2_config.init('G2Config', engine_config_json, False) - g2_config_mgr.init('G2ConfigMgr', engine_config_json, False) - - g2_config_mgr.getDefaultConfigID(current_config_id) - g2_config_mgr.getConfig(current_config_id, current_config) - - config_handle = g2_config.load(current_config) - g2_config.addDataSource(config_handle, '{"DSRC_CODE": "CUSTOMERS"}', add_response) - g2_config.addDataSource(config_handle, '{"DSRC_CODE": "WATCHLIST"}', add_response) - g2_config.addDataSource(config_handle, '{"DSRC_CODE": "REFERENCE"}', add_response) - g2_config.addDataSource(config_handle, '{"DSRC_CODE": "MYTEST"}', add_response) - g2_config.save(config_handle, new_config) - - g2_config_mgr.addConfig(new_config, 'Test data sources added', new_config_id) - g2_config_mgr.setDefaultConfigID(new_config_id) - - g2_config.destroy() - g2_config_mgr.destroy() - -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(f'Datasources added, new default config ID: {new_config_id.decode()}') diff --git a/Python/APIs/G2Config/Data_Source_Management/deleteDataSource.py b/Python/APIs/G2Config/Data_Source_Management/deleteDataSource.py deleted file mode 100755 index b3a66a8..0000000 --- a/Python/APIs/G2Config/Data_Source_Management/deleteDataSource.py +++ /dev/null @@ -1,40 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2Config, G2ConfigMgr, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -add_response = bytearray() -current_config = bytearray() -current_config_id = bytearray() -new_config = bytearray() -new_config_id = bytearray() - - -try: - g2_config = G2Config() - g2_config_mgr = G2ConfigMgr() - - g2_config.init('G2Config', engine_config_json, False) - g2_config_mgr.init('G2ConfigMgr', engine_config_json, False) - - g2_config_mgr.getDefaultConfigID(current_config_id) - g2_config_mgr.getConfig(current_config_id, current_config) - - config_handle = g2_config.load(current_config) - - g2_config.deleteDataSource(config_handle, '{"DSRC_CODE": "MYTEST"}') - g2_config.save(config_handle, new_config) - g2_config.close(config_handle) - - g2_config_mgr.addConfig(new_config, 'Data source deleted', new_config_id) - g2_config_mgr.setDefaultConfigID(new_config_id) - - g2_config.destroy() - g2_config_mgr.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(f'Datasource deleted, new default config ID: {new_config_id.decode()}') diff --git a/Python/APIs/G2Config/Data_Source_Management/listDataSources.py b/Python/APIs/G2Config/Data_Source_Management/listDataSources.py deleted file mode 100755 index 7a74a8a..0000000 --- a/Python/APIs/G2Config/Data_Source_Management/listDataSources.py +++ /dev/null @@ -1,32 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2Config, G2ConfigMgr, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -current_config = bytearray() -current_config_id = bytearray() -data_sources = bytearray() - -try: - g2_config = G2Config() - g2_config_mgr = G2ConfigMgr() - - g2_config.init('G2Config', engine_config_json, False) - g2_config_mgr.init('G2ConfigMgr', engine_config_json, False) - - g2_config_mgr.getDefaultConfigID(current_config_id) - g2_config_mgr.getConfig(current_config_id, current_config) - config_handle = g2_config.load(current_config) - - g2_config.listDataSources(config_handle, data_sources) - g2_config.close(config_handle) - - g2_config.destroy() - g2_config_mgr.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(data_sources.decode()) diff --git a/Python/APIs/G2ConfigMgr/Config_Management/addConfig.py b/Python/APIs/G2ConfigMgr/Config_Management/addConfig.py deleted file mode 100755 index 95f781f..0000000 --- a/Python/APIs/G2ConfigMgr/Config_Management/addConfig.py +++ /dev/null @@ -1,25 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2ConfigMgr, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -current_config_id = bytearray() -current_config = bytearray() -new_config_id = bytearray() - -with open('../../../../Resources/Configs/Test_Config.json', 'r') as file: - config = file.read().strip() - -try: - g2_config_mgr = G2ConfigMgr() - g2_config_mgr.init('G2ConfigMgr', engine_config_json, False) - g2_config_mgr.addConfig(config, 'Testing adding a config.', new_config_id) - g2_config_mgr.setDefaultConfigID(new_config_id.decode()) - g2_config_mgr.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(f'Configuration added, new configuration ID: {new_config_id.decode()}') diff --git a/Python/APIs/G2ConfigMgr/Config_Management/getConfig.py b/Python/APIs/G2ConfigMgr/Config_Management/getConfig.py deleted file mode 100755 index 498221f..0000000 --- a/Python/APIs/G2ConfigMgr/Config_Management/getConfig.py +++ /dev/null @@ -1,21 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2ConfigMgr, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -current_config_id = bytearray() -config = bytearray() - -try: - g2_config_mgr = G2ConfigMgr() - g2_config_mgr.init('G2ConfigMgr', engine_config_json, False) - g2_config_mgr.getDefaultConfigID(current_config_id) - g2_config_mgr.getConfig(current_config_id.decode(), config) - g2_config_mgr.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(config.decode()) diff --git a/Python/APIs/G2ConfigMgr/Config_Management/getConfigList.py b/Python/APIs/G2ConfigMgr/Config_Management/getConfigList.py deleted file mode 100755 index 30259e4..0000000 --- a/Python/APIs/G2ConfigMgr/Config_Management/getConfigList.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2ConfigMgr, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -config_list = bytearray() - -try: - g2_config_mgr = G2ConfigMgr() - g2_config_mgr.init('G2ConfigMgr', engine_config_json, False) - g2_config_mgr.getConfigList(config_list) - g2_config_mgr.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(config_list.decode()) diff --git a/Python/APIs/G2ConfigMgr/Config_Management/getDefaultConfigID.py b/Python/APIs/G2ConfigMgr/Config_Management/getDefaultConfigID.py deleted file mode 100755 index 93ee5d1..0000000 --- a/Python/APIs/G2ConfigMgr/Config_Management/getDefaultConfigID.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2ConfigMgr, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -config_id = bytearray() - -try: - g2_config_mgr = G2ConfigMgr() - g2_config_mgr.init('G2ConfigMgr', engine_config_json, False) - g2_config_mgr.getDefaultConfigID(config_id) - g2_config_mgr.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(f'Default config ID: {config_id.decode()}') diff --git a/Python/APIs/G2ConfigMgr/Config_Management/replaceDefaultConfigID.py b/Python/APIs/G2ConfigMgr/Config_Management/replaceDefaultConfigID.py deleted file mode 100755 index 7db567d..0000000 --- a/Python/APIs/G2ConfigMgr/Config_Management/replaceDefaultConfigID.py +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2ConfigMgr, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -CURRENT_CONFIG_ID = 1646704028 -NEW_CONFIG_ID = 1888647012 - -try: - g2_config_mgr = G2ConfigMgr() - g2_config_mgr.init('G2ConfigMgr', engine_config_json, False) - g2_config_mgr.replaceDefaultConfigID(CURRENT_CONFIG_ID, NEW_CONFIG_ID) - g2_config_mgr.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(f'Previous config ID {CURRENT_CONFIG_ID} replaced with {NEW_CONFIG_ID}') diff --git a/Python/APIs/G2ConfigMgr/Config_Management/setDefaultConfigID.py b/Python/APIs/G2ConfigMgr/Config_Management/setDefaultConfigID.py deleted file mode 100755 index 9d61450..0000000 --- a/Python/APIs/G2ConfigMgr/Config_Management/setDefaultConfigID.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2ConfigMgr, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -CONFIG_ID = 1646704028 - -try: - g2_config_mgr = G2ConfigMgr() - g2_config_mgr.init('G2ConfigMgr', engine_config_json, False) - g2_config_mgr.setDefaultConfigID(CONFIG_ID) - g2_config_mgr.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(f'Default config ID set to: {CONFIG_ID}') diff --git a/Python/APIs/G2Engine/Data_Manipulation/addRecord.py b/Python/APIs/G2Engine/Data_Manipulation/addRecord.py deleted file mode 100755 index 12783b4..0000000 --- a/Python/APIs/G2Engine/Data_Manipulation/addRecord.py +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -RECORD = '''{"RECORD_TYPE": "PERSON", - "PRIMARY_NAME_LAST": "Smith", - "PRIMARY_NAME_FIRST": "Robert", - "DATE_OF_BIRTH": "12/11/1978", - "ADDR_TYPE": "MAILING", - "ADDR_LINE1": - "123 Main Street, Las Vegas NV 89132", - "PHONE_TYPE": "HOME", - "PHONE_NUMBER": "702-919-1300", - "EMAIL_ADDRESS": "bsmith@work.com", - "DATE": "1/2/18", - "STATUS": "Active", - "AMOUNT": "100"}''' - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.addRecord('TEST', '1001', RECORD) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception)as ex: - print(ex) - sys.exit(-1) - -print('Record added') diff --git a/Python/APIs/G2Engine/Data_Manipulation/addRecordWithInfo.py b/Python/APIs/G2Engine/Data_Manipulation/addRecordWithInfo.py deleted file mode 100755 index 5862693..0000000 --- a/Python/APIs/G2Engine/Data_Manipulation/addRecordWithInfo.py +++ /dev/null @@ -1,32 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -RECORD = '''{"RECORD_TYPE": "PERSON", - "PRIMARY_NAME_LAST": "Smith", - "PRIMARY_NAME_FIRST": "Robert", - "DATE_OF_BIRTH": "12/11/1978", - "ADDR_TYPE": "MAILING", - "ADDR_LINE1": - "123 Main Street, Las Vegas NV 89132", - "PHONE_TYPE": "HOME", - "PHONE_NUMBER": "702-919-1300", - "EMAIL_ADDRESS": "bsmith@work.com", - "DATE": "1/2/18", - "STATUS": "Active", - "AMOUNT": "100"}''' -with_info = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.addRecordWithInfo('TEST', '1001', RECORD, with_info) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception)as ex: - print(ex) - sys.exit(-1) - -print(with_info.decode()) diff --git a/Python/APIs/G2Engine/Data_Manipulation/addRecordWithInfoReturnedRecordID.py b/Python/APIs/G2Engine/Data_Manipulation/addRecordWithInfoReturnedRecordID.py deleted file mode 100755 index aa9d19c..0000000 --- a/Python/APIs/G2Engine/Data_Manipulation/addRecordWithInfoReturnedRecordID.py +++ /dev/null @@ -1,32 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -RECORD = '''{"RECORD_TYPE": "PERSON", - "PRIMARY_NAME_LAST": "Kusha", - "PRIMARY_NAME_FIRST": "Eddie", - "DATE_OF_BIRTH": "Mar 1 1970", - "ADDR_TYPE": "HOME", - "ADDR_LINE1": "1304 Poppy Hills Dr", - "ADDR_CITY": "Blacklick", - "ADDR_STATE": "OHIO", - "DATE": "1/8/16", - "STATUS": "Inactive", - "AMOUNT": "700"}''' -record_id = bytearray() -with_info = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.addRecordWithInfoWithReturnedRecordID('TEST', RECORD, record_id, with_info) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception)as ex: - print(ex) - sys.exit(-1) - -print(f'Record ID: {record_id.decode()}') -print(f'With Info: {with_info.decode()}') diff --git a/Python/APIs/G2Engine/Data_Manipulation/addRecordWithReturnedRecordID.py b/Python/APIs/G2Engine/Data_Manipulation/addRecordWithReturnedRecordID.py deleted file mode 100755 index 230f6c9..0000000 --- a/Python/APIs/G2Engine/Data_Manipulation/addRecordWithReturnedRecordID.py +++ /dev/null @@ -1,33 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -record = '''{"RECORD_TYPE": "PERSON", - "PRIMARY_NAME_LAST": "Kusha", - "PRIMARY_NAME_FIRST": "Edward", - "DATE_OF_BIRTH": "3/1/1970", - "SSN_NUMBER": "294-66-9999", - "ADDR_TYPE": "HOME", "ADDR_LINE1": - "1304 Poppy Hills Dr", - "ADDR_CITY": "Blacklick", - "ADDR_STATE": "OH", - "ADDR_POSTAL_CODE": "43004", - "EMAIL_ADDRESS": "Kusha123@hmail.com", - "DATE": "1/7/18", - "STATUS": "Active", - "AMOUNT": "600"}''' -record_id = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.addRecordWithReturnedRecordID('TEST', record_id, record) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception)as ex: - print(ex) - sys.exit(-1) - -print(f'Record added, record ID: {record_id.decode()}') diff --git a/Python/APIs/G2Engine/Data_Manipulation/deleteRecord.py b/Python/APIs/G2Engine/Data_Manipulation/deleteRecord.py deleted file mode 100755 index ca44a9b..0000000 --- a/Python/APIs/G2Engine/Data_Manipulation/deleteRecord.py +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.deleteRecord('TEST', '1001') - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception)as ex: - print(ex) - sys.exit(-1) - -print('Record deleted') diff --git a/Python/APIs/G2Engine/Data_Manipulation/deleteRecordWithInfo.py b/Python/APIs/G2Engine/Data_Manipulation/deleteRecordWithInfo.py deleted file mode 100755 index 204d752..0000000 --- a/Python/APIs/G2Engine/Data_Manipulation/deleteRecordWithInfo.py +++ /dev/null @@ -1,21 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -with_info = bytearray() - - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.deleteRecordWithInfo('TEST', '1001', with_info) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception)as ex: - print(ex) - sys.exit(-1) - -print('Record deleted') -print(f'With Info: {with_info.decode()}') diff --git a/Python/APIs/G2Engine/Data_Manipulation/replaceRecord.py b/Python/APIs/G2Engine/Data_Manipulation/replaceRecord.py deleted file mode 100755 index 51d3d52..0000000 --- a/Python/APIs/G2Engine/Data_Manipulation/replaceRecord.py +++ /dev/null @@ -1,32 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -RECORD = '''{"RECORD_TYPE": "PERSON", - "PRIMARY_NAME_LAST": "Smith", - "PRIMARY_NAME_FIRST": "Robert", - "DATE_OF_BIRTH": "12/11/1978", - "GENDER": "M", - "ADDR_TYPE": "MAILING", - "ADDR_LINE1": - "123 Main Street, Las Vegas NV 89132", - "PHONE_TYPE": "HOME", - "PHONE_NUMBER": "702-919-1300", - "EMAIL_ADDRESS": "bsmith@work.com", - "DATE": "1/2/18", - "STATUS": "Active", - "AMOUNT": "100"}''' - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.replaceRecord('TEST', '1001', RECORD) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception)as ex: - print(ex) - sys.exit(-1) - -print('Record replaced') diff --git a/Python/APIs/G2Engine/Data_Manipulation/replaceRecordWithInfo.py b/Python/APIs/G2Engine/Data_Manipulation/replaceRecordWithInfo.py deleted file mode 100755 index 1941ccf..0000000 --- a/Python/APIs/G2Engine/Data_Manipulation/replaceRecordWithInfo.py +++ /dev/null @@ -1,33 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -RECORD = '''{"RECORD_TYPE": "PERSON", - "PRIMARY_NAME_LAST": "Smith", - "PRIMARY_NAME_FIRST": "Robert", - "DATE_OF_BIRTH": "12/11/1978", - "GENDER": "M", - "ADDR_TYPE": "MAILING", - "ADDR_LINE1": - "123 Main Street, Las Vegas NV 89132", - "PHONE_TYPE": "HOME", - "PHONE_NUMBER": "702-919-1300", - "EMAIL_ADDRESS": "bsmith@work.com", - "DATE": "1/2/18", - "STATUS": "Active", - "AMOUNT": "100"}''' -with_info = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.replaceRecordWithInfo('TEST', '1001', RECORD, with_info) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception)as ex: - print(ex) - sys.exit(-1) - -print(with_info.decode()) diff --git a/Python/APIs/G2Engine/Engine_Info/exportConfig.py b/Python/APIs/G2Engine/Engine_Info/exportConfig.py deleted file mode 100755 index 8a6e89e..0000000 --- a/Python/APIs/G2Engine/Engine_Info/exportConfig.py +++ /dev/null @@ -1,21 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -config = bytearray() -config_id = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.exportConfig(config, config_id) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(f'Active config ID: {config_id.decode()}\n') -print(config.decode()) diff --git a/Python/APIs/G2Engine/Engine_Info/getActiveConfigID.py b/Python/APIs/G2Engine/Engine_Info/getActiveConfigID.py deleted file mode 100755 index 6208582..0000000 --- a/Python/APIs/G2Engine/Engine_Info/getActiveConfigID.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -config_id = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.getActiveConfigID(config_id) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(f'Active config ID: {config_id.decode()}') diff --git a/Python/APIs/G2Engine/Engine_Info/getRepositoryLastModifiedTime.py b/Python/APIs/G2Engine/Engine_Info/getRepositoryLastModifiedTime.py deleted file mode 100755 index 3a59a79..0000000 --- a/Python/APIs/G2Engine/Engine_Info/getRepositoryLastModifiedTime.py +++ /dev/null @@ -1,21 +0,0 @@ -#! /usr/bin/env python3 - -from datetime import datetime -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -last_mod_time = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.getRepositoryLastModifiedTime(last_mod_time) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(f'Timestamp: {last_mod_time.decode()}') -print(f'Date time: {datetime.fromtimestamp(int(int(last_mod_time.decode()) / 1000))}') diff --git a/Python/APIs/G2Engine/Engine_Info/stats.py b/Python/APIs/G2Engine/Engine_Info/stats.py deleted file mode 100755 index b648200..0000000 --- a/Python/APIs/G2Engine/Engine_Info/stats.py +++ /dev/null @@ -1,30 +0,0 @@ -#! /usr/bin/env python3 - -from json import loads -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -stats = bytearray() - -with open('../../../../Resources/Data/load-5K.json', 'r') as file: - records = [next(file) for i in range(100)] - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - - for record in records: - data_source = loads(record)['DATA_SOURCE'] - record_id = loads(record)['RECORD_ID'] - g2_engine.addRecord(data_source, record_id, record) - - g2_engine.stats(stats) - - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(stats.decode()) diff --git a/Python/APIs/G2Engine/Find_Path/findNetworkByEntityID.py b/Python/APIs/G2Engine/Find_Path/findNetworkByEntityID.py deleted file mode 100755 index d4b08ec..0000000 --- a/Python/APIs/G2Engine/Find_Path/findNetworkByEntityID.py +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException, G2EngineFlags - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -find_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.findNetworkByEntityID('{"ENTITIES": [{"ENTITY_ID": "100008"}, {"ENTITY_ID": "55"}]}', - 5, - 2, - 10, - find_response, - flags=G2EngineFlags.G2_FIND_PATH_DEFAULT_FLAGS) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(find_response.decode()) diff --git a/Python/APIs/G2Engine/Find_Path/findNetworkByRecordID.py b/Python/APIs/G2Engine/Find_Path/findNetworkByRecordID.py deleted file mode 100755 index 33c0377..0000000 --- a/Python/APIs/G2Engine/Find_Path/findNetworkByRecordID.py +++ /dev/null @@ -1,32 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException, G2EngineFlags - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -find_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.findNetworkByRecordID('''{"RECORDS": [{ - "DATA_SOURCE": "REFERENCE", - "RECORD_ID": "2071" - }, - { - "DATA_SOURCE": "CUSTOMERS", - "RECORD_ID": "1069" - } - ]}''', - 5, - 2, - 10, - find_response, - flags=G2EngineFlags.G2_FIND_PATH_DEFAULT_FLAGS) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(find_response.decode()) diff --git a/Python/APIs/G2Engine/Find_Path/findPathByEntityID.py b/Python/APIs/G2Engine/Find_Path/findPathByEntityID.py deleted file mode 100755 index 037cd9f..0000000 --- a/Python/APIs/G2Engine/Find_Path/findPathByEntityID.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -find_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.findPathByEntityID(100016, 200017, 3, find_response) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(find_response.decode()) diff --git a/Python/APIs/G2Engine/Find_Path/findPathByRecordID.py b/Python/APIs/G2Engine/Find_Path/findPathByRecordID.py deleted file mode 100755 index 1707d8a..0000000 --- a/Python/APIs/G2Engine/Find_Path/findPathByRecordID.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -find_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.findPathByRecordID('REFERENCE', '2081', 'REFERENCE', '2132', 3, find_response) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(find_response.decode()) diff --git a/Python/APIs/G2Engine/Find_Path/findPathExcludingByEntityID.py b/Python/APIs/G2Engine/Find_Path/findPathExcludingByEntityID.py deleted file mode 100755 index 24c6884..0000000 --- a/Python/APIs/G2Engine/Find_Path/findPathExcludingByEntityID.py +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2EngineFlags, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -find_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.findPathExcludingByEntityID(13, - 14, - 2, - '{"ENTITIES": [{"ENTITY_ID": "6"}]}', - find_response, - flags=G2EngineFlags.G2_FIND_PATH_DEFAULT_FLAGS) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(find_response.decode()) diff --git a/Python/APIs/G2Engine/Find_Path/findPathExcludingByRecordID.py b/Python/APIs/G2Engine/Find_Path/findPathExcludingByRecordID.py deleted file mode 100755 index 4754f30..0000000 --- a/Python/APIs/G2Engine/Find_Path/findPathExcludingByRecordID.py +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2EngineFlags, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -find_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.findPathExcludingByRecordID('CUSTOMERS', - '1019', - 'CUSTOMERS', - '1020', - 2, - '{"ENTITIES": [{"ENTITY_ID": "6"}]}', - find_response, - flags=G2EngineFlags.G2_FIND_PATH_DEFAULT_FLAGS) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(find_response.decode()) diff --git a/Python/APIs/G2Engine/Find_Path/findPathIncludingSourceByEntityID.py b/Python/APIs/G2Engine/Find_Path/findPathIncludingSourceByEntityID.py deleted file mode 100755 index 5e591d1..0000000 --- a/Python/APIs/G2Engine/Find_Path/findPathIncludingSourceByEntityID.py +++ /dev/null @@ -1,25 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2EngineFlags, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -find_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.findPathIncludingSourceByEntityID(13, - 14, - 2, - '{"ENTITIES": []}', - '{"SOURCES": [{"DATA_SOURCE": "WATCHLIST"}]}', - find_response, - flags=G2EngineFlags.G2_FIND_PATH_DEFAULT_FLAGS) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(find_response.decode()) diff --git a/Python/APIs/G2Engine/Find_Path/findPathIncludingSourceByRecordID.py b/Python/APIs/G2Engine/Find_Path/findPathIncludingSourceByRecordID.py deleted file mode 100755 index 4c89299..0000000 --- a/Python/APIs/G2Engine/Find_Path/findPathIncludingSourceByRecordID.py +++ /dev/null @@ -1,27 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2EngineFlags, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -find_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.findPathIncludingSourceByRecordID('CUSTOMERS', - '1019', - 'CUSTOMERS', - '1020', - 2, - '{"ENTITIES": []}', - '{"SOURCES": [{"DATA_SOURCE": "WATCHLIST"}]}', - find_response, - flags=G2EngineFlags.G2_FIND_PATH_DEFAULT_FLAGS) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(find_response.decode()) diff --git a/Python/APIs/G2Engine/Get/getEntityByEntityID.py b/Python/APIs/G2Engine/Get/getEntityByEntityID.py deleted file mode 100755 index 5d768f8..0000000 --- a/Python/APIs/G2Engine/Get/getEntityByEntityID.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -get_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.getEntityByEntityID(1, get_response) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(get_response.decode()) diff --git a/Python/APIs/G2Engine/Get/getEntityByRecordID.py b/Python/APIs/G2Engine/Get/getEntityByRecordID.py deleted file mode 100755 index e18ce37..0000000 --- a/Python/APIs/G2Engine/Get/getEntityByRecordID.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -get_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.getEntityByRecordID('TEST', '1001', get_response) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(get_response.decode()) diff --git a/Python/APIs/G2Engine/Get/getRecord.py b/Python/APIs/G2Engine/Get/getRecord.py deleted file mode 100755 index 2484605..0000000 --- a/Python/APIs/G2Engine/Get/getRecord.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -get_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.getRecord('TEST', '1001', get_response) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(get_response.decode()) diff --git a/Python/APIs/G2Engine/How/howEntityByEntityID.py b/Python/APIs/G2Engine/How/howEntityByEntityID.py deleted file mode 100755 index ed2f886..0000000 --- a/Python/APIs/G2Engine/How/howEntityByEntityID.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -how_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.howEntityByEntityID(1, how_response) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(how_response.decode()) diff --git a/Python/APIs/G2Engine/Object_Management/init.py b/Python/APIs/G2Engine/Object_Management/init.py deleted file mode 100755 index 0222dcb..0000000 --- a/Python/APIs/G2Engine/Object_Management/init.py +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2Diagnostic, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) - -try: - g2_engine = G2Diagnostic() - g2_engine.init('G2Engine', engine_config_json, False) - - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print('G2Engine initialized and destroyed') diff --git a/Python/APIs/G2Engine/Object_Management/initWithConfigID.py b/Python/APIs/G2Engine/Object_Management/initWithConfigID.py deleted file mode 100755 index 7c94f8f..0000000 --- a/Python/APIs/G2Engine/Object_Management/initWithConfigID.py +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -CONFIG_ID = 193870676 - -try: - g2_engine = G2Engine() - g2_engine.initWithConfigID('G2Engine', engine_config_json, CONFIG_ID, False) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(f'G2Engine initialized (then destroyed) with config ID: {CONFIG_ID}') diff --git a/Python/APIs/G2Engine/Object_Management/primeEngine.py b/Python/APIs/G2Engine/Object_Management/primeEngine.py deleted file mode 100755 index b0acca4..0000000 --- a/Python/APIs/G2Engine/Object_Management/primeEngine.py +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - - g2_engine.primeEngine() - - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print('Engine primed.') diff --git a/Python/APIs/G2Engine/Object_Management/reinit.py b/Python/APIs/G2Engine/Object_Management/reinit.py deleted file mode 100755 index 3dfbb55..0000000 --- a/Python/APIs/G2Engine/Object_Management/reinit.py +++ /dev/null @@ -1,43 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2Engine, G2ConfigMgr, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -new_config_id = bytearray() - - -def config_ids(): - active_id = bytearray() - config_id = bytearray() - - g2_engine.getActiveConfigID(active_id) - g2_config_mgr.getDefaultConfigID(config_id) - print(f'Active ID: {active_id.decode()} - Default ID: {config_id.decode()}') - - -with open('../../../../Resources/Configs/Test_Config2.json', 'r') as file: - config = file.read().strip() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_config_mgr = G2ConfigMgr() - g2_config_mgr.init('G2ConfigMgr', engine_config_json, False) - - config_ids() - - g2_config_mgr.addConfig(config, 'Testing reinit.', new_config_id) - g2_config_mgr.setDefaultConfigID(new_config_id) - - config_ids() - - g2_engine.reinit(new_config_id) - - config_ids() - - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) diff --git a/Python/APIs/G2Engine/Purge/purgeRepository.py b/Python/APIs/G2Engine/Purge/purgeRepository.py deleted file mode 100755 index d7ed827..0000000 --- a/Python/APIs/G2Engine/Purge/purgeRepository.py +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.purgeRepository() - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print('Senzing repository purged') diff --git a/Python/APIs/G2Engine/Redo/countRedoRecords.py b/Python/APIs/G2Engine/Redo/countRedoRecords.py deleted file mode 100755 index 5505a60..0000000 --- a/Python/APIs/G2Engine/Redo/countRedoRecords.py +++ /dev/null @@ -1,16 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - print(g2_engine.countRedoRecords()) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) diff --git a/Python/APIs/G2Engine/Redo/getRedoRecord.py b/Python/APIs/G2Engine/Redo/getRedoRecord.py deleted file mode 100755 index 2079280..0000000 --- a/Python/APIs/G2Engine/Redo/getRedoRecord.py +++ /dev/null @@ -1,23 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -redo_record = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.getRedoRecord(redo_record) - - if redo_record: - g2_engine.process(redo_record.decode()) - else: - print('No redo records currently available.') - - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) diff --git a/Python/APIs/G2Engine/Redo/process.py b/Python/APIs/G2Engine/Redo/process.py deleted file mode 100755 index 2079280..0000000 --- a/Python/APIs/G2Engine/Redo/process.py +++ /dev/null @@ -1,23 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -redo_record = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.getRedoRecord(redo_record) - - if redo_record: - g2_engine.process(redo_record.decode()) - else: - print('No redo records currently available.') - - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) diff --git a/Python/APIs/G2Engine/Redo/processRedoRecord.py b/Python/APIs/G2Engine/Redo/processRedoRecord.py deleted file mode 100755 index 4742b48..0000000 --- a/Python/APIs/G2Engine/Redo/processRedoRecord.py +++ /dev/null @@ -1,23 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -redo_record = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.processRedoRecord(redo_record) - - if redo_record: - print(redo_record.decode()) - else: - print('No redo records currently available.') - - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) diff --git a/Python/APIs/G2Engine/Redo/processRedoRecordWithInfo.py b/Python/APIs/G2Engine/Redo/processRedoRecordWithInfo.py deleted file mode 100755 index 5ca01c7..0000000 --- a/Python/APIs/G2Engine/Redo/processRedoRecordWithInfo.py +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -redo_record = bytearray() -with_info = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.processRedoRecordWithInfo(redo_record, with_info) - - if with_info: - print(with_info.decode()) - else: - print('No redo records currently available.') - - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) diff --git a/Python/APIs/G2Engine/Redo/processWithInfo.py b/Python/APIs/G2Engine/Redo/processWithInfo.py deleted file mode 100755 index 9dd4c49..0000000 --- a/Python/APIs/G2Engine/Redo/processWithInfo.py +++ /dev/null @@ -1,25 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -redo_record = bytearray() -with_info = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.getRedoRecord(redo_record) - - if redo_record: - g2_engine.processWithInfo(redo_record.decode(), with_info) - print(with_info.decode()) - else: - print('No redo records currently available.') - - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) diff --git a/Python/APIs/G2Engine/Reevaluation/reevaluateEntity.py b/Python/APIs/G2Engine/Reevaluation/reevaluateEntity.py deleted file mode 100755 index 45120c5..0000000 --- a/Python/APIs/G2Engine/Reevaluation/reevaluateEntity.py +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.reevaluateEntity(1) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print('Entity re-evaluated') diff --git a/Python/APIs/G2Engine/Reevaluation/reevaluateEntityWithInfo.py b/Python/APIs/G2Engine/Reevaluation/reevaluateEntityWithInfo.py deleted file mode 100755 index a581301..0000000 --- a/Python/APIs/G2Engine/Reevaluation/reevaluateEntityWithInfo.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -with_info = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.reevaluateEntityWithInfo(1, with_info) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(with_info.decode()) diff --git a/Python/APIs/G2Engine/Reevaluation/reevaluateRecord.py b/Python/APIs/G2Engine/Reevaluation/reevaluateRecord.py deleted file mode 100755 index 68e61f7..0000000 --- a/Python/APIs/G2Engine/Reevaluation/reevaluateRecord.py +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.reevaluateRecord('TEST', '1001') - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print('Record re-evaluated') diff --git a/Python/APIs/G2Engine/Reevaluation/reevaluateRecordWithInfo.py b/Python/APIs/G2Engine/Reevaluation/reevaluateRecordWithInfo.py deleted file mode 100755 index 99f32d9..0000000 --- a/Python/APIs/G2Engine/Reevaluation/reevaluateRecordWithInfo.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -with_info = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.reevaluateRecordWithInfo('TEST', '1001', with_info) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(with_info.decode()) diff --git a/Python/APIs/G2Engine/Reporting/exportCSVEntityReport.py b/Python/APIs/G2Engine/Reporting/exportCSVEntityReport.py deleted file mode 100755 index 2001192..0000000 --- a/Python/APIs/G2Engine/Reporting/exportCSVEntityReport.py +++ /dev/null @@ -1,49 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -fetch_next_response = bytearray() -CSV_HEADERS= 'RESOLVED_ENTITY_ID,RESOLVED_ENTITY_NAME,RELATED_ENTITY_ID,MATCH_LEVEL,MATCH_KEY,IS_DISCLOSED,IS_AMBIGUOUS,DATA_SOURCE,RECORD_ID,JSON_DATA,LAST_SEEN_DT,NAME_DATA,ATTRIBUTE_DATA,IDENTIFIER_DATA,ADDRESS_DATA,PHONE_DATA,RELATIONSHIP_DATA,ENTITY_DATA,OTHER_DATA' - - -def fetch_next(handle, response): - """ Fetch the next export record from the handle""" - - try: - g2_engine.fetchNext(handle, response) - except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - - return response.decode() - - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - - export_handle = g2_engine.exportCSVEntityReport(CSV_HEADERS) - - with open('../../../../Resources/Output/exportCSVEntityReport.json', 'w') as export_out: - - export_record = fetch_next(export_handle, fetch_next_response) - - while export_record: - try: - export_out.write(export_record) - except IOError as ex: - print(ex) - sys.exit(-1) - - export_record = fetch_next(export_handle, fetch_next_response) - - g2_engine.closeExport(export_handle) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print('CSV export report complete') diff --git a/Python/APIs/G2Engine/Reporting/exportJSONEntityReport.py b/Python/APIs/G2Engine/Reporting/exportJSONEntityReport.py deleted file mode 100755 index 4447a97..0000000 --- a/Python/APIs/G2Engine/Reporting/exportJSONEntityReport.py +++ /dev/null @@ -1,48 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -fetch_next_response = bytearray() - - -def fetch_next(handle, response): - """ Fetch the next export record from the handle""" - - try: - g2_engine.fetchNext(handle, response) - except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - - return response.decode() - - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - - export_handle = g2_engine.exportJSONEntityReport() - - with open('../../../../Resources/Output/exportJSONEntityReport.json', 'w') as export_out: - - export_record = fetch_next(export_handle, fetch_next_response) - - while export_record: - try: - export_out.write(export_record) - except IOError as ex: - print(ex) - sys.exit(-1) - - export_record = fetch_next(export_handle, fetch_next_response) - - g2_engine.closeExport(export_handle) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print('JSON export report complete') diff --git a/Python/APIs/G2Engine/Search/searchByAttributes.py b/Python/APIs/G2Engine/Search/searchByAttributes.py deleted file mode 100755 index 248817f..0000000 --- a/Python/APIs/G2Engine/Search/searchByAttributes.py +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -search_response = bytearray() - - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.searchByAttributes('{"NAME_FULL":"robert smith", "DATE_OF_BIRTH":"12/11/1978"}', search_response) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(search_response.decode()) diff --git a/Python/APIs/G2Engine/Why/whyEntities.py b/Python/APIs/G2Engine/Why/whyEntities.py deleted file mode 100755 index 79e8ad3..0000000 --- a/Python/APIs/G2Engine/Why/whyEntities.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -why_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.whyEntities(1, 6, why_response) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(why_response.decode()) diff --git a/Python/APIs/G2Engine/Why/whyEntityByEntityID.py b/Python/APIs/G2Engine/Why/whyEntityByEntityID.py deleted file mode 100755 index 8e1d485..0000000 --- a/Python/APIs/G2Engine/Why/whyEntityByEntityID.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -why_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.whyEntityByEntityID(1, why_response) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(why_response.decode()) diff --git a/Python/APIs/G2Engine/Why/whyEntityByRecordID.py b/Python/APIs/G2Engine/Why/whyEntityByRecordID.py deleted file mode 100755 index 7d8dd00..0000000 --- a/Python/APIs/G2Engine/Why/whyEntityByRecordID.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -why_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.whyEntityByRecordID('CUSTOMERS', '1001', why_response) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(why_response.decode()) diff --git a/Python/APIs/G2Engine/Why/whyRecords.py b/Python/APIs/G2Engine/Why/whyRecords.py deleted file mode 100755 index d704b4e..0000000 --- a/Python/APIs/G2Engine/Why/whyRecords.py +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -why_response = bytearray() - -try: - g2_engine = G2Engine() - g2_engine.init('G2Engine', engine_config_json, False) - g2_engine.whyRecords('CUSTOMERS', '1009', 'WATCHLIST', '1014', why_response) - g2_engine.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(why_response.decode()) diff --git a/Python/APIs/G2Engine/_getVirtualEntityBy... b/Python/APIs/G2Engine/_getVirtualEntityBy... deleted file mode 100644 index e69de29..0000000 diff --git a/Python/APIs/G2Product/License_Info/license.py b/Python/APIs/G2Product/License_Info/license.py deleted file mode 100755 index 62791b2..0000000 --- a/Python/APIs/G2Product/License_Info/license.py +++ /dev/null @@ -1,16 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2Product, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) - -try: - g2_product = G2Product() - g2_product.init('G2Product', engine_config_json, False) - print(g2_product.license()) - g2_product.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) diff --git a/Python/APIs/G2Product/License_Info/validateLicenseFile.py b/Python/APIs/G2Product/License_Info/validateLicenseFile.py deleted file mode 100755 index 92067af..0000000 --- a/Python/APIs/G2Product/License_Info/validateLicenseFile.py +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2Product, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) -VALID_LICENSE_FILE = '../../../../Resources/License/g2.lic_Valid_File' -INVALID_LICENSE_FILE = '../../../../Resources/License/g2.lic_Invalid_File' - -try: - g2_product = G2Product() - g2_product.init('G2Product', engine_config_json, False) - - return_code_valid = g2_product.validateLicenseFile(VALID_LICENSE_FILE) - return_code_invalid = g2_product.validateLicenseFile(INVALID_LICENSE_FILE) - - print(f'License file {VALID_LICENSE_FILE} is {"valid" if return_code_valid == 0 else "not valid"}') - print(f'\nLicense file {INVALID_LICENSE_FILE} is {"valid" if return_code_invalid == 0 else "not valid"}') - - g2_product.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) diff --git a/Python/APIs/G2Product/License_Info/validateLicenseStringBase64.py b/Python/APIs/G2Product/License_Info/validateLicenseStringBase64.py deleted file mode 100755 index cc34535..0000000 --- a/Python/APIs/G2Product/License_Info/validateLicenseStringBase64.py +++ /dev/null @@ -1,27 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2Product, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) - -with open('../../../../Resources/License/g2lic_Valid_base64.txt', 'r') as file: - valid_license_string = file.read().strip() - -INVALID_LICENSE_STRING = 'this_isnt_valid_for_a_license_string!' - -try: - g2_product = G2Product() - g2_product.init('G2Product', engine_config_json, False) - - return_code_invalid = g2_product.validateLicenseStringBase64(INVALID_LICENSE_STRING) - return_code_valid = g2_product.validateLicenseStringBase64(valid_license_string) - - print(f'License string is {"valid" if return_code_invalid == 0 else "not valid"}') - print(f'\nLicense string is {"valid" if return_code_valid == 0 else "not valid"}') - - g2_product.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) diff --git a/Python/APIs/G2Product/Version/version.py b/Python/APIs/G2Product/Version/version.py deleted file mode 100755 index e71a301..0000000 --- a/Python/APIs/G2Product/Version/version.py +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env python3 - -import os -import sys -from senzing import G2Product, G2BadInputException, G2Exception, G2RetryableException, G2UnrecoverableException - -engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None) - -try: - g2_product = G2Product() - g2_product.init('G2Product', engine_config_json, False) - - g2_product.destroy() -except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex: - print(ex) - sys.exit(-1) - -print(g2_product.version()) diff --git a/Python/APIs/README.md b/Python/APIs/README.md index b3ebb12..114e021 100644 --- a/Python/APIs/README.md +++ b/Python/APIs/README.md @@ -1 +1 @@ -Additional API details at [docs.senzing.com](https://docs.senzing.com) +API details at [docs.senzing.com](https://docs.senzing.com)