RBGKew / pykew

Python library for accessing Kew's data services
30 stars 4 forks source link

How get all synonyms for a specific taxoname ? #7

Closed bolom closed 2 years ago

bolom commented 2 years ago

First all, thanks for this amazing library.

There is a way to get all synonyms for a specific Taxon Name / Plant ?


query = {Name.genus: "Acalypha" , Name.species: "arvensis"}
res = powo.search(query)
res.size()
print([r['name'] for r in res if 'name' in r])

Returns me 4 plants, however I can see 7 synonyms

https://powo.science.kew.org/taxon/urn:lsid:ipni.org:names:1115-2

bolom commented 2 years ago

I've found the solution

https://github.com/RBGKew/pykew/blob/master/pykew/powo.py#L8