caterva2.get_list#

caterva2.get_list(path, urlbase=None, auth_cookie=None)#

List the datasets in a path.

Parameters:
  • path (str) – The path to a root, directory or dataset.

  • urlbase (str) – The base of URLs of the subscriber to query. Default is caterva2.sub_urlbase_default.

  • auth_cookie (str) – An optional HTTP cookie for authorizing access.

Returns:

The list of datasets, as name strings relative to it.

Return type:

list

Examples

>>> import caterva2 as cat2
>>> urlbase = 'https://demo.caterva2.net'
>>> cat2.subscribe('example', urlbase)
'Ok'
>>> cat2.get_list('example', urlbase)[:3]
['ds-2d-fields.b2nd', 'lung-jpeg2000_10x.b2nd', 'ds-1d-fields.b2nd']