oaklib provides a variety of interfaces that abstract away from implementation details and provide a coherent set of operations to perform on an ontology. Developers can code to the interface largely without worrying about whether the implementation is a relational database, a local file, etc.

For example, the Ubergraph Adapter implements Search Interface which has the method oaklib.interfaces.search_interface.SearchInterface.basic_search(), so you can write code like this:

>>> from oaklib import get_adapter
>>> adapter = get_adapter("sqlite:obo:uberon")
>>> for r in adapter.descendants('UBERON:0003884'):
...     print(r)



The most common operations are found in the Basic Ontology Interface



Some interfaces may not be “pure” interfaces is that they may provide a default implementation, which may or may not be overridden by an implementation