Skip to main content
Version: 1.2.0 (latest)

common.configuration.specs.gcp_credentials

GcpCredentials Objects

@configspec
class GcpCredentials(CredentialsConfiguration)

[view_source]

to_native_credentials

def to_native_credentials() -> Any

[view_source]

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]

[view_source]

Dict of keyword arguments can be passed to gcsfs. Delegates default GCS credential handling to gcsfs.

GcpServiceAccountCredentialsWithoutDefaults Objects

@configspec
class GcpServiceAccountCredentialsWithoutDefaults(GcpCredentials)

[view_source]

parse_native_representation

def parse_native_representation(native_value: Any) -> None

[view_source]

Accepts ServiceAccountCredentials as native value. In other case reverts to serialized services.json

to_native_credentials

def to_native_credentials() -> Any

[view_source]

Returns google.oauth2.service_account.Credentials

GcpOAuthCredentialsWithoutDefaults Objects

@configspec
class GcpOAuthCredentialsWithoutDefaults(GcpCredentials, OAuth2Credentials)

[view_source]

parse_native_representation

def parse_native_representation(native_value: Any) -> None

[view_source]

Accepts Google OAuth2 credentials as native value. In other case reverts to serialized oauth client secret json

on_partial

def on_partial() -> None

[view_source]

Allows for an empty refresh token if the session is interactive or tty is attached

to_native_credentials

def to_native_credentials() -> Any

[view_source]

Returns google.oauth2.credentials.Credentials

GcpDefaultCredentials Objects

@configspec
class GcpDefaultCredentials(CredentialsWithDefault, GcpCredentials)

[view_source]

parse_native_representation

def parse_native_representation(native_value: Any) -> None

[view_source]

Accepts google credentials as native value

on_partial

def on_partial() -> None

[view_source]

Looks for default google credentials and resolves configuration if found. Otherwise continues as partial

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.