Skip to main content
Version: devel

dlt.common.configuration.specs.gcp_credentials

GcpCredentials Objects

@configspec
class GcpCredentials(CredentialsConfiguration, WithObjectStoreRsCredentials)

View source on GitHub

to_native_credentials

def to_native_credentials() -> Any

View source on GitHub

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 on GitHub

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

to_object_store_rs_credentials

def to_object_store_rs_credentials() -> Dict[str, str]

View source on GitHub

Dict of keyword arguments that can be passed to object_store Rust crate. Delegates default GCS credential handling to object_store Rust crate.

GcpServiceAccountCredentialsWithoutDefaults Objects

@configspec
class GcpServiceAccountCredentialsWithoutDefaults(GcpCredentials,
WithPyicebergConfig)

View source on GitHub

parse_native_representation

def parse_native_representation(native_value: Any) -> None

View source on GitHub

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

to_native_credentials

def to_native_credentials() -> Any

View source on GitHub

Returns google.oauth2.service_account.Credentials

GcpOAuthCredentialsWithoutDefaults Objects

@configspec
class GcpOAuthCredentialsWithoutDefaults(GcpCredentials, OAuth2Credentials,
WithPyicebergConfig)

View source on GitHub

parse_native_representation

def parse_native_representation(native_value: Any) -> None

View source on GitHub

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 on GitHub

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 on GitHub

Returns google.oauth2.credentials.Credentials

GcpDefaultCredentials Objects

@configspec
class GcpDefaultCredentials(CredentialsWithDefault, GcpCredentials)

View source on GitHub

parse_native_representation

def parse_native_representation(native_value: Any) -> None

View source on GitHub

Accepts google credentials as native value

on_partial

def on_partial() -> None

View source on GitHub

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.