caterva2.Dataset#

class caterva2.Dataset(name, root, host)#

A dataset is a Blosc2 container in a file.

Parameters:
  • name (str) – The name of the dataset.

  • root (str) – The name of the root.

  • host (str) – The host to query.

Examples

>>> root = cat2.Root('foo')
>>> ds = root['ds-1d.b2nd']
>>> ds.name
'ds-1d.b2nd'
>>> ds[1:10]
array([1, 2, 3, 4, 5, 6, 7, 8, 9])
Attributes:
vlmeta

Access variable-length metalayers (i.e. user attributes) for a file.

>>> root = cat2.Root('foo')
>>> file = root['ds-sc-attr.b2nd']
>>> file.vlmeta
{'a': 1, 'b': 'foo', 'c': 123.456}
dict

The mapping of metalayer names to their respective values.

Methods

download()

Download a file.

fetch([slice_, prefer_schunk])

Fetch a slice of a dataset.

get_download_url()

Get the download URL for a file.

__init__(name, root, host)#

Methods

__init__(name, root, host)

download()

Download a file.

fetch([slice_, prefer_schunk])

Fetch a slice of a dataset.

get_download_url()

Get the download URL for a file.

Attributes

vlmeta

Access variable-length metalayers (i.e. user attributes) for a file.