Пример #1
0
def test_auth_hidden_password():
    username = "******"
    password = "******"
    auth = tc.UsernamePasswordAuth(username, password)

    assert password not in repr(auth)
    assert password not in str(auth)
Пример #2
0
def session() -> tc.Session:
    auth = tc.UsernamePasswordAuth("username", "password")
    s = tc.session.from_auth(auth)
    return s
Пример #3
0
from getpass import getpass

import tamr_client as tc

username = input("Tamr Username:"******"Tamr Password:"******"http"
host = "localhost"
port = 9100

instance = tc.Instance(protocol=protocol, host=host, port=port)

project = tc.project.by_name(session, instance, "MasteringTutorial")

if not isinstance(project, tc.MasteringProject):
    raise RuntimeError(f"{project.name} is not a mastering project.")

operation_1 = tc.mastering.update_unified_dataset(session, project)
tc.operation.check(session, operation_1)

operation_2 = tc.mastering.generate_pairs(session, project)
tc.operation.check(session, operation_2)

operation_3 = tc.mastering.apply_feedback(session, project)
tc.operation.check(session, operation_3)

operation_4 = tc.mastering.update_pair_results(session, project)