From a3f6d6c3e57311b48712c1ae603d20e934fc5524 Mon Sep 17 00:00:00 2001 From: Ross Kelso Date: Mon, 25 Sep 2023 15:22:23 +0100 Subject: [PATCH] Added NTLM example, --- example/ntlm_example.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 example/ntlm_example.py diff --git a/example/ntlm_example.py b/example/ntlm_example.py new file mode 100644 index 0000000..9745419 --- /dev/null +++ b/example/ntlm_example.py @@ -0,0 +1,29 @@ +"""A client app that uses NTLM authentication""" +__author__ = "Ross Kelso" +__docformat__ = 'reStructuredText' + +from getpass import getpass + + +import intelligent_plant.data_core_client as data_core_client + +# This is the format of the base url for an app store connected installed locally +# This is the same as the URL of the admin UI +# YOU MUST INCLUDE THE TRAILING '/' +base_url = 'http://localhost:2006/Service/runtime/[app store connect namespace]/datacore/' + +print("Username:") +username = input() + +password = getpass() + +auth = { + 'user': username, + 'password': password +} + +data_core= data_core_client.DataCoreClient(base_url=base_url, auth=auth) + +data_sources = data_core.get_data_sources() + +print(list(map(lambda x: x['Name']['QualifiedName'], data_sources))) \ No newline at end of file