hydromt.typing.FSSpecFileSystem#
- pydantic model hydromt.typing.FSSpecFileSystem[source]#
Pydantic compatible fsspec AbstractFileSystem.
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.
- get_fs(storage_options: dict[str, Any] | None = None) AbstractFileSystem[source]#
Get the underlying fsspec filesystem.
This is the single place where driver-level overrides are merged into the filesystem. Readers take the resulting
AbstractFileSystemand never seestorage_options.- Parameters:
storage_options (
dict[str,Any] | None, optional) – Additional storage options to merge with this filesystem’s own storage options. Useful for driver-level options (e.g. set under a driver’soptionsrather than itsfilesystem) that weren’t available at filesystem construction time. Default is None, which reuses the filesystem built at construction time.
- serialize(include_credentials: bool = False) dict[str, Any][source]#
Serialize the filesystem to a dict.
- Parameters:
include_credentials – Whether to include passwords/secrets in the serialized dict.
- static create(input: Any) FSSpecFileSystem[source]#
Create an fsspec filesystem from various inputs.