Skip to main content

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.

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.

Files for pykew, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size pykew-0.0.2-py2.py3-none-any.whl (9.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size pykew-0.0.2.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page