hydromt.data_catalog.drivers.DriverOptions#

pydantic model hydromt.data_catalog.drivers.DriverOptions[source]#

Options for the driver.

Fields declared in this class or its subclasses are used to configure the behavior of the driver. Any other undeclared keyword arguments are allowed and will be stored in the instance. These extra keyword arguments are passed as kwargs to the underlying open functions used by the driver.

Retrieving the extra kwargs can be done using the get_kwargs method: - Some options may be solely used internally by the driver and not passed to the open functions. - Some options may be used both internally and passed to the open functions. - To specify which declared fields should be passed to the open functions, set the class variable KWARGS_FOR_OPEN. - By default, all declared fields are excluded, and only extra kwargs are passed.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

KWARGS_FOR_OPEN: ClassVar[set[str]] = {}#

Fields that are to be included as kwargs when passing to open functions. By default, all fields defined in the class are excluded.

classmethod get_excluded_kwarg_names_for_open() set[str][source]#

Get the fields that are to be excluded when passing to open functions.

This includes all declared fields in the class, minus those defined in KWARGS_FOR_OPEN.

to_dict(exclude: set[str] | None = None) dict[source]#

Return dict of kwargs excluding reserved/internal keys, and including the extra kwargs.

get_kwargs() dict[str, Any][source]#

Return attributes set that are not explicitly declared fields.