import pywikibot
test = pywikibot.Site()
test_page = pywikibot.Page(test, 'User:-revi/test')
test_page.exists()
False
test_page.text = 'Test, will be deleted later anyway'
test_page.save()
Sleeping for 8.2 seconds, 2016-06-24 14:52:44
Page [[User:-revi/test]] saved
repo = test.data_repository()
repo
DataSite("test", "wikidata")
item = pywikibot.ItemPage(repo, "Q2523")
item
ItemPage('Q2523')
item_dict = item.get()
item_dict.keys()
dict_keys(['claims', 'aliases', 'sitelinks', 'labels', 'descriptions'])
item_dict["labels"]['en']
'Lilly Potter'