All properties of an entity
2213500360 opened this issue · comments
xu_dlut commented
As in title,can I get all properties of an entity?Thanks
Martín Gaitán commented
for the record, I've just did this.
In [49]: data = client.get("Q107365", load=True)
In [50]: attrs = [client.get(attribute) for attribute in data.attributes.get('claims').keys()]
In [51]: {attr.label["en"]: data[attr] for attr in attrs}
Out [51]:
{'FIFA player ID (archived)': '228912',
'position played on team / speciality': <wikidata.entity.Entity Q201330>,
'sex or gender': <wikidata.entity.Entity Q6581097>,
'occupation': <wikidata.entity.Entity Q937857>,
'member of sports team': <wikidata.entity.Entity Q15789>,
'place of birth': <wikidata.entity.Entity Q2765>,
'award received': <wikidata.entity.Entity Q311830>,
'country of citizenship': <wikidata.entity.Entity Q183>,
'VIAF ID': '11051079',
'Commons category': 'Manuel Neuer',
'GND ID': '133960692',
'date of birth': datetime.date(1986, 3, 27),
'instance of': <wikidata.entity.Entity Q5>,
'official website': 'http://www.manuel-neuer.de/',
'Freebase ID': '/m/02899ft',
'given name': <wikidata.entity.Entity Q11113719>,
'sport': <wikidata.entity.Entity Q2736>,
'sport number': '1',
'participant in': <wikidata.entity.Entity Q79859>,
'Munzinger Sport number': '01000007267',
'WorldFootball.net player ID': 'manuel-neuer',
'languages spoken, written or signed': <wikidata.entity.Entity Q188>,
'GTAA ID': '229126',
'Twitter username': 'Manuel_Neuer',
'IMDb ID': 'nm2568047',
'Commons gallery': 'Manuel Neuer',
'UEFA player ID': '97923',
'residence': <wikidata.entity.Entity Q2765>,
'educated at': <wikidata.entity.Entity Q674057>,
'Transfermarkt player ID': '17259',
'National-Football-Teams.com player ID': '31465',
'Mackolik.com player ID': '22992',
'mass': wikidata.quantity.Quantity(92.0, None, None, <wikidata.entity.Entity Q11570>),
'height': wikidata.quantity.Quantity(193.0, None, None, <wikidata.entity.Entity Q174728>),
'Facebook ID': 'manuel.neuer',
'Fussballdaten.de player ID': 'neuermanuel',
'ISNI': '0000 0000 1801 0937',
'ESPNFC.com player ID': '84774',
'FootballDatabase.eu player ID': '14274',
'AS.com athlete ID': 'neuer/15383',
'family name': <wikidata.entity.Entity Q16864501>,
'Quora topic ID': 'Manuel-Neuer-football-player',
'NE.se ID': 'manuel-neuer',
'league': <wikidata.entity.Entity Q82595>,
'Instagram username': 'manuelneuer',
'birth name': '(de:) Manuel Peter Neuer'[6:],
'Encyclopædia Britannica Online ID': 'biography/Manuel-Peter-Neuer',
'Great Russian Encyclopedia Online ID': '3355149',
'country for sport': <wikidata.entity.Entity Q183>,
'name in native language': '(de:) Manuel Neuer'[6:],
'Soccerway player ID': 'manuel-neuer/1970',
"topic's main category": <wikidata.entity.Entity Q55245201>,
'image': <wikidata.commonsmedia.File 'File:Manuel Neuer Germany Austria June 2018.jpg'>,
'NKCR AUT ID': 'xx0222396',
'Giant Bomb ID': '3005-38099',
'work period (start)': 2004,
'PlaymakerStats.com player ID': '29193',
'München Wiki article ID': 'Manuel_Neuer',
'Brockhaus Enzyklopädie online ID': 'neuer-manuel',
'Store norske leksikon ID': 'Manuel_Neuer',
'WorldCat Identities ID': 'viaf-11051079',
'number of matches played/races/starts': wikidata.quantity.Quantity(2.0, None, None, None),
'total goals in career': wikidata.quantity.Quantity(0.0, None, None, None),
'number of points/goals conceded': wikidata.quantity.Quantity(3.0, None, None, None),
'German Football Association person ID': '10435',
'Kicker.de player ID (former scheme)': '30669',
'EU-Football.info player ID': '26616',
'BDFA player ID': '61366',
"L'Équipe football player ID": '22939',
'So Foot ID': 'manuel-neuer',
'Kicker.de player ID (actual scheme)': 'manuel-neuer',
'PLWABN ID': '9810576374305606',
'NLP ID (old)': 'A29775620',
'social media followers': wikidata.quantity.Quantity(3961870.0, None, None, None),
'Klexikon article ID': 'Manuel_Neuer',
'FBref player ID': '8778c910',
'BDFutbol player ID': '92643',
'Soccerbase player ID': '44916',
'Kooora/Goalzz player ID': '25931',
'TMDB person ID': '1146750',
'Trading Card Database person ID': '34836',
'Deutsche Synchronkartei dubbing voice actor ID': '6297',
'Library of Congress authority ID': 'no2020073207',
'NDL Authority ID': '001255681',
'Personality Database profile ID': '6749',
'Golden ID': 'Manuel_Neuer-KWN6G8'}