Skip to content

daft.functions.hdf5_file#

hdf5_file #

hdf5_file(url: Expression, verify: bool = False, io_config: IOConfig | None = None) -> Expression

Converts a string containing a file reference to a daft.Hdf5File reference.

Parameters:

Name Type Description Default
url String Expression

the url of the file

required
verify bool

If True, verify that the file exists and is an HDF5 file. If ANY files are not HDF5 files, this will produce an error.

False
io_config IOConfig, default=None

The IO configuration to use.

None

Returns:

Name Type Description
Expression File[Hdf5] Expression

An expression containing the file reference.

Source code in daft/functions/file_.py
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
def hdf5_file(url: Expression, verify: bool = False, io_config: IOConfig | None = None) -> Expression:
    """Converts a string containing a file reference to a `daft.Hdf5File` reference.

    Args:
        url (String Expression): the url of the file
        verify:
            If True, verify that the file exists and is an HDF5 file.
            If **ANY** files are not HDF5 files, this will produce an error.

        io_config (IOConfig, default=None): The IO configuration to use.

    Returns:
        Expression (File[Hdf5] Expression): An expression containing the file reference.

    """
    return url._eval_expressions("hdf5_file", verify=verify, io_config=io_config)