caterva2.get_roots#
- caterva2.get_roots(urlbase=None, auth_cookie=None)#
Get the list of available roots.
- Parameters:
- Returns:
A mapping of available root names to their
name
,http
endpoint and whether they aresubscribed
or not.- Return type:
dict
Examples
>>> import caterva2 as cat2 >>> roots_dict = cat2.get_roots("https://demo.caterva2.net") >>> sorted(roots_dict.keys()) ['@public', 'b2tests', 'example', 'h5example', 'h5lung_j2k', 'h5numbers_j2k'] >>> cat2.subscribe('b2tests', "https://demo.caterva2.net") 'Ok' >>> roots_dict['b2tests'] {'name': 'b2tests', 'http': 'localhost:8014', 'subscribed': True}