Source code for module.utils.set_person_facts

import avesterra as av


[docs] def set_person_facts(person_entity: av.AvEntity, name: str, address: str, occupation: str, company: str, auth: av.AvAuthorization): """ This function shows how to add a few Facts to an existing person entity. It's probably obvious that a person can have one or more facts. :param person_entity: The entity ID of the person entity to add the facts. :param name: The Person's name :param address: Person's address :param occupation: Person's occupation :param company: Person's company :param auth: The Orchestra server authorization that allows entity operations. """ av.set_fact( entity=person_entity, attribute=av.AvAttribute.NAME, value=av.AvValue.encode_string(name), authorization=auth, ) av.set_fact( entity=person_entity, attribute=av.AvAttribute.ADDRESS, value=av.AvValue.encode_string(address), authorization=auth, ) av.set_fact( entity=person_entity, attribute=av.AvAttribute.OCCUPATION, value=av.AvValue.encode_string(occupation), authorization=auth, ) av.set_fact( entity=person_entity, attribute=av.AvAttribute.COMPANY, value=av.AvValue.encode_string(company), authorization=auth, )