prefect_soda_cloud.auth_config
This blocks can be used to store credentials that will be used to authenticate to Soda Cloud APIs.
Classes
SodaCloudAuthConfig
Bases: Block
This block can be used to store the configuration details required to interact with Soda Cloud and its APIs.
Attributes:
Name | Type | Description |
---|---|---|
api_base_url |
str
|
Soda Cloud base URL. |
creds |
SodaCloudCredentials
|
|
wait_secs_between_api_calls |
Optional[int]
|
The number of seconds to
wait between API calls. Default to |
from prefect_soda_cloud import (
SodaCloudAuthConfig,
SodaCloudCredentials
)
auth_config = SodaCloudAuthConfig(
api_base_url="https://cloud.soda.io",
creds=SodaCloudCredentials(
user_or_api_key_id="user",
pwd_or_api_key_secret="pwd"
),
wait_secs_between_api_calls=1
)
Source code in prefect_soda_cloud/auth_config.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
Functions
get_client
Returns a SodaCloudClient
object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
logger |
Logger
|
A configured logger. |
required |
Returns:
Type | Description |
---|---|
SodaCloudClient
|
A |
Source code in prefect_soda_cloud/auth_config.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
SodaCloudCredentials
Bases: Block
This block contains sensitive informations that will be used during the authentication flow with Soda Cloud. Please refer to Soda Cloud docs for more information about authentication.
Attributes:
Name | Type | Description |
---|---|---|
user_or_api_key_id |
str
|
Username or API Key ID. |
pwd_or_api_key_secret |
SecretStr
|
Password or API Key Secret. |
from prefect_soda_cloud import SodaCloudCredentials
creds = SodaCloudCredentials(
user_or_api_key_id="user",
pwd_or_api_key_secret="pwd"
)
Source code in prefect_soda_cloud/auth_config.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|