Edit in GitHubLog an issue

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#

Copied to your clipboard
TargetClient.create(options)

Parameters#

options has the following structure:

NameTypeRequiredDefaultDescription
clientstrYesNoneAdobe Target client ID
organization_idstrYesNoneExperience Cloud Organization ID
timeoutintNo3000Timeout in milliseconds
server_domainstrNoclient.tt.omtrdc.net
secureboolNotrueUnset to enforce HTTP scheme
loggerobjectNoINFO logger
target_location_hintstrNoNoneTarget location hint
property_tokenstrNoNoneTarget Property Token. If specified here, all get_offers calls will use this value.
decisioning_methodstrNoserver-sideDetermines which decisioning method to use (on-device, server-side, hybrid)
polling_intervalintNo300000 (5 minutes)Polling interval for the on-device decisioning rule artifact (in ms)
artifact_locationstrNoNoneA fully qualified url to the on-device decisioning rule artifact. Overrides internally determined location.
artifact_payloadobjectNoNoneThe JSON payload of the on-device decisioning rule artifact. If specified, it is used instead of requesting one from a URL.
​​eventsdict <str, callable>NoNone
environment_idintNoproductionThe Target environment ID
environment_namestrNoproductionThe Target environment name
cdn_environmentstrNoproductionThe CDN environment name
telemetry_enabledboolNoTrueIf set to False, telemetry data will not be sent to Adobe
versionstrNoNoneThe version number of this sdk

Example#

Copied to your clipboard
1from target_python_sdk import TargetClient
2
3def client_ready_callback(ready_event):
4 # make calls to Adobe Target
5
6client_options = {
7 "client": "acmeclient",
8 "organization_id": "1234567890@AdobeOrg",
9 "events": {
10 "client_ready": client_ready_callback
11 }
12}
13target_client = TargetClient.create(client_options)
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell my personal information
  • AdChoices
Copyright © 2022 Adobe. All rights reserved.