Initialize SDK
Description
Use the create
method in order to initialize the Python SDK and instantiate the Target Client to make calls to Adobe Target for experiments and personalized experiences.
Method#
create
Copied to your clipboardTargetClient.create(options)
Parameters#
options
has the following structure:
Name | Type | Required | Default | Description |
---|---|---|---|---|
client | str | Yes | None | Adobe Target client ID |
organization_id | str | Yes | None | Experience Cloud Organization ID |
timeout | int | No | 3000 | Timeout in milliseconds |
server_domain | str | No | client.tt.omtrdc.net | |
secure | bool | No | true | Unset to enforce HTTP scheme |
logger | object | No | INFO logger | |
target_location_hint | str | No | None | Target location hint |
property_token | str | No | None | Target Property Token. If specified here, all get_offers calls will use this value. |
decisioning_method | str | No | server-side | Determines which decisioning method to use (on-device, server-side, hybrid) |
polling_interval | int | No | 300000 (5 minutes) | Polling interval for the on-device decisioning rule artifact (in ms) |
artifact_location | str | No | None | A fully qualified url to the on-device decisioning rule artifact. Overrides internally determined location. |
artifact_payload | object | No | None | The JSON payload of the on-device decisioning rule artifact. If specified, it is used instead of requesting one from a URL. |
| events | dict <str, callable> | No | None |
environment_id | int | No | production | The Target environment ID |
environment_name | str | No | production | The Target environment name |
cdn_environment | str | No | production | The CDN environment name |
telemetry_enabled | bool | No | True | If set to False, telemetry data will not be sent to Adobe |
version | str | No | None | The version number of this sdk |
Example#
Python
Copied to your clipboard1from target_python_sdk import TargetClient23def client_ready_callback(ready_event):4 # make calls to Adobe Target56client_options = {7 "client": "acmeclient",8 "organization_id": "1234567890@AdobeOrg",9 "events": {10 "client_ready": client_ready_callback11 }12}13target_client = TargetClient.create(client_options)