caterva2.get_info#

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

Retrieves information about a specified dataset.

Parameters:
  • path (str) – Path to the dataset.

  • urlbase (str, optional) – Base URL of to query. Defaults to caterva2.sub_urlbase_default.

  • auth_cookie (str, optional) – HTTP cookie for authorization.

Returns:

Dictionary of dataset properties, mapping property names to their values.

Return type:

dict

Examples

>>> import caterva2 as cat2
>>> urlbase = 'https://demo.caterva2.net'
>>> cat2.subscribe('example', urlbase)
'Ok'
>>> path = 'example/ds-2d-fields.b2nd'
>>> info = cat2.get_info(path, urlbase)
>>> info.keys()
dict_keys(['shape', 'chunks', 'blocks', 'dtype', 'schunk'])
>>> info['shape']
[100, 200]