Skip to content

Commit

Permalink
Added NTLM example,
Browse files Browse the repository at this point in the history
  • Loading branch information
RossRKK committed Sep 25, 2023
1 parent 3267735 commit a3f6d6c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions example/ntlm_example.py
Original file line number Diff line number Diff line change
@@ -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)))

0 comments on commit a3f6d6c

Please sign in to comment.