GCS
This class represents any GCS specific configuration. It extends the Storage class, providing methods to automatically configure GCS settings and retrieve fsspec keyword arguments tailored for GCS.
Methods
auto()
@classmethod
def auto() - > [GCS](gcs.md?sid=flyte_storage__config_gcs)
Creates a GCS instance by automatically inferring configuration from the environment. This method allows for convenient instantiation without explicit parameter passing.
Returns
| Type | Description |
|---|---|
[GCS](gcs.md?sid=flyte_storage__config_gcs) | A new GCS object configured based on environment variables or other automatic discovery mechanisms. |
get_fsspec_kwargs()
@classmethod
def get_fsspec_kwargs(
anonymous: bool = False,
**kwargs: typing.Any
) - > typing.Dict[str, typing.Any]
Retrieves keyword arguments suitable for fsspec to configure GCS access. This method is used to prepare authentication and other connection details for file system operations.
Parameters
| Name | Type | Description |
|---|---|---|
| anonymous | bool = False | A boolean indicating whether to access GCS anonymously. Set to True for public buckets without requiring authentication. |
| **kwargs | typing.Any | Additional keyword arguments to be passed through to the underlying fsspec implementation. |
Returns
| Type | Description |
|---|---|
typing.Dict[str, typing.Any] | A dictionary of keyword arguments that can be passed to fsspec for GCS filesystem initialization. |