caterva2.Root.__getitem__#

Root.__getitem__(path)#

Retrieves a file or dataset from the root.

Parameters:

path (str or Path) – Path of the file or dataset to retrieve.

Returns:

An instance of File or Dataset.

Return type:

File, Dataset

Examples

>>> import caterva2 as cat2
>>> client = cat2.Client('https://demo.caterva2.net')
>>> root = client.get('example')
>>> root['ds-1d.b2nd']
<Dataset: example/ds-1d.b2nd>