Skip to main content

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

TypeDescription
[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

NameTypeDescription
anonymousbool = FalseA boolean indicating whether to access GCS anonymously. Set to True for public buckets without requiring authentication.
**kwargstyping.AnyAdditional keyword arguments to be passed through to the underlying fsspec implementation.

Returns

TypeDescription
typing.Dict[str, typing.Any]A dictionary of keyword arguments that can be passed to fsspec for GCS filesystem initialization.