Skip to main content

KaggleCredential

Credential
DashAI.back.credentials.KaggleCredential

Credential for the Kaggle API.

The key is expected in the form "username:api_key".

Methods

apply(self) -> None

Defined on KaggleCredential

Export the stored Kaggle credentials to the environment.

verify(self, key: str) -> bool

Defined on KaggleCredential

Validate a Kaggle credential with the official kaggle library.

Parameters

key : str
Kaggle credential in the form "username:api_key".

Returns

bool
True if the credential authenticates successfully.

auth(self, key: str) -> bool

Defined on BaseCredential

Validate and persist a key.

Parameters

key : str
The key to authenticate with.

Returns

bool
True on success.

get_credential(self, name: str)

Defined on ConfigObject

Resolve a registered credential component by name.

Parameters

name : str
Credential component class name (e.g. "HuggingFaceCredential").

Returns

BaseCredential
An instance of the requested credential component.

get_key(self) -> Optional[str]

Defined on BaseCredential

Return the stored decrypted key, or None.

Returns

Union[str, None]
The decrypted key, or None if not authenticated.

get_schema(cls) -> dict

Defined on ConfigObject

Generates the component related Json Schema.

Returns

dict
Dictionary representing the Json Schema of the component.

is_authenticated(self) -> bool

Defined on BaseCredential

Return whether a verified key is stored.

Returns

bool
True if authenticated.

validate_and_transform(self, raw_data: dict) -> dict

Defined on ConfigObject

It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.

Parameters

raw_data : dict
A dictionary with the data provided by the user to initialize the model.

Returns

dict
A validated dictionary with the necessary objects.