import sys
import os
import os.path
import json
import wikidata.client
import time
import datetime
import pprint
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-255160c2a2ce> in <module>()
      3 import os.path
      4 import json
----> 5 import wikidata.client
      6 import time
      7 import datetime

ModuleNotFoundError: No module named 'wikidata'
# First we define ID of UAB

uabID = u"Q43452"
client = wikidata.client.Client()

entity = client.get(uabID, load=True)
entity
<wikidata.entity.Entity Q43452 'Autonomous University of Barcelona'>
entity.label
m'Autonomous University of Barcelona'
entity.description
m'public university  in Catalonia, Spain'
# We get ID of University rector
instance_prop = client.get('P1075')
rector = entity[ instance_prop ]
rector
<wikidata.entity.Entity Q30080359>
rector.label
m'Margarita Arboix Arzo'