import argparse
import getpass
import logging
import tableauserverclient as TSC
parser = argparse.ArgumentParser(description='Creates sample schedules for each type of frequency.')
parser.add_argument('--server', '-s', required=True, help='server address')
parser.add_argument('--username', '-u', required=True, help='username to sign into server')
parser.add_argument('--logging-level', '-l', choices=['debug', 'info', 'error'], default='error',
help='desired logging level (set to error by default)')
args = parser.parse_args()
password = getpass.getpass("Password: ")
tableau_auth = TSC.TableauAuth(args.username, password)
server = TSC.Server(args.server)
# create a new UserItem object.
newU = TSC.UserItem('Monty', 'Publisher')
print(newU.name, newU.site_role)