Get started

Fill in your host name and get started exploring your catalog with the datapath API.


In [ ]:
from deriva.core import ErmrestCatalog, get_credential

Fill in your desired scheme, hostname and catalog number.


In [ ]:
scheme = 'https'
hostname = None
catalog_number = 1

Use DERIVA-Auth to get a credential or use None if your catalog allows anonymous access.


In [ ]:
credential = None
#credential = get_credential(hostname)

Now, connect to your catalog and the pathbuilder interface for the catalog.


In [ ]:
assert scheme == 'http' or scheme == 'https', "Invalid http scheme used."
assert isinstance(hostname, str), "Hostname not set."
assert isinstance(catalog_number, int), "Invalid catalog number"
catalog = ErmrestCatalog(scheme, hostname, catalog_number, credential)
pb = catalog.getPathBuilder()

Start using the pathbuilder, like this to get a list of your catalog's schema names.


In [ ]:
list(pb.schemas)