common.configuration.specs.gcp_credentials
GcpCredentials Objects
@configspec
class GcpCredentials(CredentialsConfiguration)
to_native_credentials
def to_native_credentials() -> Any
Returns respective native credentials for service account or oauth2 that can be passed to google clients
to_gcs_credentials
def to_gcs_credentials() -> Dict[str, Any]
Dict of keyword arguments can be passed to gcsfs. Delegates default GCS credential handling to gcsfs.
GcpServiceAccountCredentialsWithoutDefaults Objects
@configspec
class GcpServiceAccountCredentialsWithoutDefaults(GcpCredentials)
parse_native_representation
def parse_native_representation(native_value: Any) -> None
Accepts ServiceAccountCredentials as native value. In other case reverts to serialized services.json
to_native_credentials
def to_native_credentials() -> Any
Returns google.oauth2.service_account.Credentials
GcpOAuthCredentialsWithoutDefaults Objects
@configspec
class GcpOAuthCredentialsWithoutDefaults(GcpCredentials, OAuth2Credentials)
parse_native_representation
def parse_native_representation(native_value: Any) -> None
Accepts Google OAuth2 credentials as native value. In other case reverts to serialized oauth client secret json
on_partial
def on_partial() -> None
Allows for an empty refresh token if the session is interactive or tty is attached
to_native_credentials
def to_native_credentials() -> Any
Returns google.oauth2.credentials.Credentials
GcpDefaultCredentials Objects
@configspec
class GcpDefaultCredentials(CredentialsWithDefault, GcpCredentials)
parse_native_representation
def parse_native_representation(native_value: Any) -> None
Accepts google credentials as native value
on_partial
def on_partial() -> None
Looks for default google credentials and resolves configuration if found. Otherwise continues as partial