Secret
zenml.secret
Initialization of the ZenML Secret module.
A ZenML Secret is a grouping of key-value pairs. These are accessed and administered via the ZenML Secret Store.
Attributes
__all__ = ['BaseSecretSchema']
module-attribute
Classes
BaseSecretSchema
Bases: BaseModel
Base class for all Secret Schemas.
Functions
get_schema_keys() -> List[str]
classmethod
Get all attributes that are part of the schema.
These schema keys can be used to define all required key-value pairs of a secret schema.
Returns:
Type | Description |
---|---|
List[str]
|
A list of all attribute names that are part of the schema. |
Source code in src/zenml/secret/base_secret.py
24 25 26 27 28 29 30 31 32 33 34 |
|
get_values() -> Dict[str, Any]
Get all values of the secret schema.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
A dictionary of all attribute names and their corresponding values. |
Source code in src/zenml/secret/base_secret.py
36 37 38 39 40 41 42 |
|
Modules
base_secret
Implementation of the Base SecretSchema class.
Classes
BaseSecretSchema
Bases: BaseModel
Base class for all Secret Schemas.
get_schema_keys() -> List[str]
classmethod
Get all attributes that are part of the schema.
These schema keys can be used to define all required key-value pairs of a secret schema.
Returns:
Type | Description |
---|---|
List[str]
|
A list of all attribute names that are part of the schema. |
Source code in src/zenml/secret/base_secret.py
24 25 26 27 28 29 30 31 32 33 34 |
|
get_values() -> Dict[str, Any]
Get all values of the secret schema.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
A dictionary of all attribute names and their corresponding values. |
Source code in src/zenml/secret/base_secret.py
36 37 38 39 40 41 42 |
|
schemas
Initialization of secret schemas.
Classes
AWSSecretSchema
AzureSecretSchema
BasicAuthSecretSchema
Bases: BaseSecretSchema
Secret schema for basic authentication.
Attributes:
Name | Type | Description |
---|---|---|
username |
str
|
The username that should be used for authentication. |
password |
str
|
The password that should be used for authentication. |
GCPSecretSchema
Bases: BaseSecretSchema
GCP Authentication Secret Schema definition.
get_credential_dict() -> Dict[str, Any]
Gets a dictionary of credentials for authenticating to GCP.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
A dictionary representing GCP credentials. |
Raises:
Type | Description |
---|---|
ValueError
|
If the token value is not a JSON string of a dictionary. |
Source code in src/zenml/secret/schemas/gcp_secret_schema.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
Modules
aws_secret_schema
AWS Authentication Secret Schema definition.
AWSSecretSchema
azure_secret_schema
Azure Authentication Secret Schema definition.
AzureSecretSchema
basic_auth_secret_schema
Basic Authentication Secret Schema definition.
BasicAuthSecretSchema
Bases: BaseSecretSchema
Secret schema for basic authentication.
Attributes:
Name | Type | Description |
---|---|---|
username |
str
|
The username that should be used for authentication. |
password |
str
|
The password that should be used for authentication. |
gcp_secret_schema
GCP Authentication Secret Schema definition.
GCPSecretSchema
Bases: BaseSecretSchema
GCP Authentication Secret Schema definition.
get_credential_dict() -> Dict[str, Any]
Gets a dictionary of credentials for authenticating to GCP.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
A dictionary representing GCP credentials. |
Raises:
Type | Description |
---|---|
ValueError
|
If the token value is not a JSON string of a dictionary. |
Source code in src/zenml/secret/schemas/gcp_secret_schema.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|