# -*- coding: utf-8 -*-
"""example for DuMemory entity_graph."""

from baidubce.services.dumemory import dumemory_client
from sample.dumemory import dumemory_sample_conf as conf


if __name__ == "__main__":
    client = dumemory_client.new_client(conf.BASE_URL, conf.API_KEY)
    try:
        resp = client.entity_graph(conf.BANK_ID, limit=50, min_count=2)
        print("Entity graph response: %s" % resp)
    except Exception as e:
        print("Exception when calling api: %s" % e)
