Skip to content
mtholder edited this page Sep 14, 2014 · 3 revisions

peyotl has a set of wrappers to make it easier to call open tree of life web services. These were written to wrap v1 of the API and are in the process of being updated. To create a wrapper that includes handles to each of the services use:

from peyotl.api import APIWrapper
ot = APIWrapper()

the ot object will use settings in your peyotl configuration to choose what domains (e.g. devapi.opentreeoflife.org vs api.opentreeoflife.org) to connect to.

The key attributes of the APIWrapper that you are most likely to want to interact with are the wrappers around each service. Below is a list of attributes and links to the pages that describe each wrapper:

* `phylesystem_api` - the phylesystem_api wrapper
* `oti` - the oti wrapper
* `taxomachine` - the Taxomachine wrapper
* `treemachine` - the Treemachine wrapper

TODO

  1. The Open Tree v2 APIs try to refer to concepts (tree of life, graph of life, TNRS, taxonomy, and studies) rather than the implementations (phylesystem_api, oti, taxomachine, treemachine). It would be nice to add some facade to the APIWrappers instance that create wrappers around the resources and delegate calls to the underlying service.
Clone this wiki locally