import pywikibot
wikidata = pywikibot.Site("wikidata","wikidata")
repo = wikidata.data_repository()
item = pywikibot.ItemPage(repo, "Q5005846")
item.properties()
{'wb-claims': '9', 'wb-sitelinks': '11'}
item.get()
{'aliases': {'de': ['C++ 2014'],
  'en': ['C++ 2014'],
  'en-ca': ['C++ 2014'],
  'en-gb': ['C++ 2014']},
 'claims': {'P155': [<pywikibot.page.Claim at 0x7fb2f8176ef0>],
  'P156': [<pywikibot.page.Claim at 0x7fb2f8179208>],
  'P279': [<pywikibot.page.Claim at 0x7fb2f8179668>],
  'P31': [<pywikibot.page.Claim at 0x7fb2f8179780>],
  'P3417': [<pywikibot.page.Claim at 0x7fb2f815c518>],
  'P503': [<pywikibot.page.Claim at 0x7fb2f8179978>],
  'P571': [<pywikibot.page.Claim at 0x7fb2f8179518>,
   <pywikibot.page.Claim at 0x7fb2f81795c0>],
  'P737': [<pywikibot.page.Claim at 0x7fb2f81790f0>]},
 'descriptions': {'cs': 'standard programovacího jazyka C++',
  'en': 'programming language standard created by ISO sub-committee',
  'en-ca': 'programming language standard created by ISO sub-committee',
  'en-gb': 'programming language standard created by ISO sub-committee',
  'eo': 'standardo de programlingvo C++'},
 'labels': {'cs': 'C++14',
  'de': 'C++14',
  'en': 'C++14',
  'en-ca': 'C++14',
  'en-gb': 'C++14',
  'eo': 'C++14',
  'es': 'C++14',
  'fa': 'C++14',
  'fi': 'C++14',
  'fr': 'C++14',
  'hy': 'C++14',
  'it': 'C++14',
  'ja': 'C++14',
  'ko': 'C++14',
  'pl': 'C++14',
  'ru': 'C++14',
  'sk': 'C++14',
  'uk': 'C++14',
  'zh': 'C++14'},
 'sitelinks': {'enwiki': 'C++14',
  'eswiki': 'C++14',
  'fawiki': 'C++14',
  'fiwiki': 'C++14',
  'frwiki': 'C++14',
  'hywiki': 'C++ 14',
  'jawiki': 'C++14',
  'kowiki': 'C++14',
  'ruwiki': 'C++14',
  'ukwiki': 'C++14',
  'zhwiki': 'C++14'}}
item_dict = item.get()
item_dict = item_dict.keys()
item_dict.keys()['claims']
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-20-097a6d50a4b4> in <module>()
----> 1 item_dict.keys()['claims']

TypeError: 'dict_keys' object is not subscriptable
print(item_dict["claims"])
{'P155': [<pywikibot.page.Claim object at 0x7fb2f8185320>], 'P737': [<pywikibot.page.Claim object at 0x7fb2f81854e0>], 'P156': [<pywikibot.page.Claim object at 0x7fb2f81855f8>], 'P571': [<pywikibot.page.Claim object at 0x7fb2f8185a90>, <pywikibot.page.Claim object at 0x7fb2f8185ac8>], 'P279': [<pywikibot.page.Claim object at 0x7fb2f8185b38>], 'P3417': [<pywikibot.page.Claim object at 0x7fb2f8185240>], 'P503': [<pywikibot.page.Claim object at 0x7fb2f8185ef0>], 'P31': [<pywikibot.page.Claim object at 0x7fb2f8185cf8>]}
print(item_dict["claims"]['P155'])
[<pywikibot.page.Claim object at 0x7fb2f8185320>]
mylist = item_dict["claims"]['P155']
for index, obj in enumerate(mylist):
    print("dict {} in list: \n{}".format(index,obj.toJSON()))
dict 0 in list: 
{'rank': 'normal', 'id': 'Q5005846$7d805388-4160-7ca3-3b39-08940bd0e658', 'type': 'statement', 'mainsnak': {'datatype': 'wikibase-item', 'snaktype': 'value', 'property': 'P155', 'datavalue': {'value': {'entity-type': 'item', 'numeric-id': 1061570}, 'type': 'wikibase-entityid'}}}