get_configured_fsspec_kwargs
Retrieves fsspec keyword arguments for a specified storage protocol, or from the default storage configuration if no protocol is provided. It supports S3, GCS, and ABFS protocols, automatically configuring the appropriate filesystem if not already initialized.
def get_configured_fsspec_kwargs(
protocol: Optional[str] = None,
anonymous: bool = False
) - > Dict[str, Any]
Retrieves the fsspec keyword arguments for a specified storage protocol or the default configured storage. Callers use this to obtain configuration details necessary for interacting with various file systems (like S3, GCS, or Azure Blob Storage) using fsspec.
Parameters
| Name | Type | Description |
|---|---|---|
| protocol | Optional[str] = None | The storage protocol for which to retrieve fsspec keyword arguments (e.g., "s3", "gs", "abfs"). If not provided, the function attempts to return arguments for the globally configured storage. |
| anonymous | bool = False | A boolean flag indicating whether to retrieve fsspec keyword arguments for anonymous access. If true, credentials will not be included in the returned arguments. |
Returns
| Type | Description |
|---|---|
Dict[str, Any] | A dictionary of keyword arguments suitable for fsspec, or an empty dictionary if no specific protocol is provided and no storage configuration is found. |