Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method to get qualifiers #57

Open
aGGre55or opened this issue Mar 10, 2024 · 1 comment
Open

Method to get qualifiers #57

aGGre55or opened this issue Mar 10, 2024 · 1 comment

Comments

@aGGre55or
Copy link

aGGre55or commented Mar 10, 2024

elon_musk_educated_at

Code:

client = Client()  # doctest: +SKIP
entity = client.get('Q317521', load=True)

client = Client()
prop = client.get('P69', load=True)

res = entity.getlist(prop)
print(res[0])
print(res[0].label)

client = Client()
start_time = res[0].get('P580')
print(start_time)

entity2 = client.get('Q105424537', load=True)
prop2 = client.get('P580', load=True)
print(prop2)
print(prop2.label)
print(type(prop2))
print(prop2.get('start time'))
print(prop2.get('P580'))

Output:

<wikidata.entity.Entity Q105424537>
Smith School of Business
None
<wikidata.entity.Entity P580 'start time'>
start time
<class 'wikidata.entity.Entity'>
None
None

@dahlia
Copy link
Owner

dahlia commented Mar 11, 2024

Qualifiers are not supported yet.

@dahlia dahlia changed the title How to get start_time of nested entity? Method to get qualifiers Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants