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

Examples

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