pyobis

pypi docs travis coverage

Python client for the OBIS API.

Source on GitHub at sckott/pyobis

Other OBIS clients:

Installation

from pypi

pip install pyobis

dev version

pip install git+git://github.com/sckott/pyobis.git#egg=pyobis

library API

pyobis is split up into modules for each of the groups of API methods.

  • taxa - Taxonomic names
  • occurrences - Occurrence search, and occurrence downloads
  • resources - Resources
  • groups - Groups
  • nodes - Nodes
  • checklist - Checklist

You can import the entire library, or each module individually as needed.

Taxa module

from pyobis import taxa
taxa.search(scientificname = 'Mola mola')
taxa.search(scientificname = 'Mola mola', offset=10, limit=10)
taxa.search(geometry='POLYGON((30.1 10.1, 10 20, 20 40, 40 40, 30.1 10.1))', limit=20)
taxa.search(aphiaid=key, year="2013", limit=20)
taxa.taxon(406296)
taxa.taxon(415282)

Occurrence module

Search

from pyobis import occurrences
occurrences.search(scientificname = 'Mola mola')
occurrences.search(scientificname = 'Mola mola', offset=0, limit=10)
occurrences.search(geometry='POLYGON((30.1 10.1, 10 20, 20 40, 40 40, 30.1 10.1))', limit=20)
occurrences.search(aphiaid=key, year="2013", limit=20)

Download

res = occ.download(year = 2001, scientificname = 'Orcinus')
res.uuid
res.status()
res.fetch()

Resources module

from pyobis import resources
resources.search(scientificname = ['Mola', 'Abra', 'Lanice', 'Pectinaria'])
resources.resource(103)
resources.citation(scientificname = 'Mola mola')

Groups module

from pyobis import groups
groups.group()
groups.group(limit = 3)

Ndes module

from pyobis import nodes
nodes.node()

Checklist module

from pyobis import checklist as ch
ch.list(year = 2005, scientificname = 'Cetacea')

Meta

License

MIT

Indices and tables