caterva2.get_info#

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

Get information about a dataset.

Parameters:
  • path (str) – The path of the 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 information about the dataset, as a mapping of property names to their respective 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]