Python client for the OBIS API.
Source on GitHub at iobis/pyobis
Other OBIS clients:
- R: robis, iobis/robis
from pypi
pip install pyobis
dev version
pip install git+git://github.com/iobis/pyobis.git#egg=pyobis
pyobis
is split up into modules for each of the groups of API methods.
checklist
- Checklist. Generate a checklist of species under a taxa, IUCN Red List, or most recently added species.dataset
- Dataset. Get metadata of datasets (includingdatasetid
,owner
,institution
,number of records
, etc) for a queried spatiotemporal region or taxa.nodes
- Nodes. Get records or activities for an OBIS node.occurrences
- Occurrence. Fetch occurrence records, geopoints, lookup for ascientificname
, extensions (e.g. DNADerivedData, MeasurementOrFacts, etc.)taxa
- Taxonomic names. Get taxon records withtaxonid
orscientificname
, and scientific name annotations by the WoRMS team.
You can import the entire library, or each module individually as needed.
from pyobis import taxa
query = taxa.search(scientificname="Mola mola")
query.execute()
query.data # Returns the data
query.api_url # Returns the API URL
data = taxa.search(scientificname="Mola mola").execute()
taxa.search(geometry="POLYGON((30.1 10.1, 10 20, 20 40, 40 40, 30.1 10.1))")
taxa.taxon(10332)
taxa.taxon(127405)
from pyobis import occurrences
query = occurrences.search(scientificname="Mola mola")
query.execute()
query.data # Returns the data
query.api_url # Returns the OBIS API URL
query.mapper_url # Returns the OBIS Mapper URL
data = occurrences.search(scientificname="Mola mola", size=10).execute()
occurrences.search(
geometry="POLYGON((30.1 10.1, 10 20, 20 40, 40 40, 30.1 10.1))", size=20
)
from pyobis import dataset
query = dataset.search(scientificname=["Mola", "Abra", "Lanice", "Pectinaria"])
query.execute()
query.data # Returns the data
query.api_url # Returns the API URL
data = dataset.get(id="ec9df3b9-3b2b-4d83-881b-27bcbcd57b95").execute()
from pyobis import nodes
query = nodes.search(scientificname=["Mola", "Abra"])
query.execute()
query.data # Returns the data
query.api_url # Returns the API URL
from pyobis import checklist
query = checklist.list(scientificname="Cetacea")
query.execute()
query.data # Returns the data
query.api_url # Returns the OBIS API URL
- License: MIT, see LICENSE file
- Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
.. toctree:: :maxdepth: 2 occurrences taxa dataset nodes checklist changelog_link
MIT