prefect_hightouch.credentials
generated
This is a module containing credentials, auto-generated, used to perform authenticated interactions with Hightouch.
HightouchCredentials
Bases: Block
Block used to manage Hightouch authentication.
Attributes:
Name | Type | Description |
---|---|---|
token |
SecretStr
|
The token to authenticate with Hightouch. |
timeout |
float
|
Number of seconds before the request times out. |
client_kwargs |
Dict[str, Any]
|
Additional keyword arguments to pass to
|
Examples:
Load stored Hightouch credentials:
from prefect_hightouch import HightouchCredentials
hightouch_credentials_block = HightouchCredentials.load("BLOCK_NAME")
Source code in prefect_hightouch/credentials/generated.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 51 52 53 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 |
|
get_client
Gets a Hightouch REST API Authenticated Client.
Returns:
Type | Description |
---|---|
AuthenticatedClient
|
A Hightouch REST API Authenticated Client. |
Example
Gets a Hightouch REST API Authenticated Client.
from prefect import flow
from prefect_hightouch import HightouchCredentials
@flow
def example_get_client_flow():
token = "consumer_key"
hightouch_credentials = HightouchCredentials(token=token)
client = hightouch_credentials.get_client()
return client
example_get_client_flow()
Source code in prefect_hightouch/credentials/generated.py
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 |
|