import pywikibot
import json

site = pywikibot.Site("test", "wikidata")
repo = site.data_repository()
item = pywikibot.Page(repo, "Q98822")
itemdata = item.get()
dict_itemdata = json.loads(itemdata)
dict_itemdata.keys()
dict_keys(['type', 'id', 'labels', 'descriptions', 'aliases', 'claims', 'sitelinks'])
new_labels = {"en": "bear", "de": "Bär"}
item.editLabels(labels=new_labels, summary="Setting new labels.")
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-54-5e34bd623c72> in <module>()
      1 new_labels = {"en": "bear", "de": "Bär"}
----> 2 item.editLabels(labels=new_labels, summary="Setting new labels.")

/srv/paws/pwb/pywikibot/page.py in __getattr__(self, name)
   2224             return lambda x: None
   2225         raise AttributeError("'{0}' object has no attribute '{1}'"
-> 2226                              .format(self.__class__.__name__, name))
   2227 
   2228 

AttributeError: 'Page' object has no attribute 'editLabels'