Python interface to Kew data
Project description
Library for easy access to Kew’s nomenclatural and taxonomic services. Hides the intracacies of usign the HTTP API.
IPNI
Module for searching IPNI data and looking up individual records.
Simple search:
import pykew.ipni as ipni
result = ipni.search('Poa annua')
Advanced search:
import pykew.ipni as ipni
from pykew.ipni_terms import Name
query = { Name.genus: 'Poa', Name.species: 'annua' }
res = ipni.search(query)
Using results:
import pykew.ipni as ipni
from pykew.ipni_terms import Name
query = { Name.genus: 'Poa', Name.species: 'annua' }
res = ipni.search(query)
res.size()
[r['name'] for r in res if 'name' in r]
POWO
Module for searching POWO data and looking up individual records. Taxonomic data is returned by default, but other associated such as distributions and descriptive text can also be retreived.
Simple search:
import pykew.powo as powo
result = powo.search('Poa annua')
Advanced search:
import pykew.powo as ipni
from pykew.powo_terms import Name
query = { Name.genus: 'Poa', Name.species: 'annua' }
res = powo.search(query)
Using results:
import pykew.ipni as ipni
from pykew.powo_terms import Name, Geography
query = { Name.genus: 'Poa', Geography.distribution: 'Africa' }
res = powo.search(query)
res.size()
[r['name'] for r in res if 'name' in r]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pykew-0.0.2.tar.gz
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for pykew-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20360e3c8f6e16864850a316c936ee46b138150223d6b8a1ecd9456ae45c8fd6 |
|
MD5 | 931d7c571323300d530e785bfc03cf70 |
|
BLAKE2b-256 | 45d75c1e589fc0f466007e8bb9b15cba3eaf83a124ca0f11c58a51c3992045e5 |