Provide class based client for accessing OLS RestAPI from EMBL-EBI
with pip
pip install ebi-ols-client
See: https://www.ebi.ac.uk/ols/docs/api for more information on OLS API
- ebi.ols.api.client.py: contains main classes to access OLS via HAL schema.
- ebi.ols.api.helpers.py: data tranfer object loaded from API calls
from ebi.ols.api.client import OlsClient
client = OlsClient()
ontology = client.ontology('fpo')
terms = ontology.terms()
individuals = ontology.individuals()
properties = ontology.properties()
# work with all 'list' item types (terms, individuals, properties
for term in terms:
# do whatever
print(term)
# Direct List'like access on all list types
term = terms[1254]
individual = individuals[123]
# ...
Please do! If you need to run tests locally, add to your virtualenv requirements-test.txt
pip install -e .
pip install -r requirements-test.txt
# to run tests
nosetests --withcoverage