Python SDK 초기화

설명
Python SDK를 초기화하고 Target Client을(를) 인스턴스화하여 실험 및 개인화된 경험을 위해 Adobe Target을(를) 호출하려면 create 메서드를 사용하십시오.

방법

만들기

TargetClient.create(options)

매개 변수

options의 구조는 다음과 같습니다.

이름
유형
필수
기본값
설명
클라이언트
str
없음
Adobe Target client ID
organization_id
str
없음
Experience Cloud Organization ID
timeout
int
아니요
3000
시간 제한(밀리초)
server_domain
str
아니요
client.tt.omtrdc.net
secure
부울
아니요
true
HTTP 체계를 적용하도록 설정 해제
로거
오브젝트
아니요
정보 로거
target_location_hint
str
아니요
없음
Target 위치 힌트
property_token
str
아니요
없음
Target 속성 토큰입니다. 여기에 지정하면 모든 get_offers 호출이 이 값을 사용합니다.
decisioning_method
str
아니요
서버측
사용할 의사 결정 방법(on-device, 서버측, 하이브리드)을 결정합니다
polling_interval
int
아니요
300000(5분)
온디바이스 의사 결정 규칙 아티팩트의 폴링 간격(밀리초)
artifact_location
str
아니요
없음
온디바이스 의사 결정 규칙 아티팩트에 대한 정규화된 URL입니다. 내부적으로 결정된 위치를 재정의합니다.
artifact_payload
오브젝트
아니요
없음
온디바이스 의사 결정 규칙 아티팩트의 JSON 페이로드. 지정하면 URL에서 요청하는 대신 사용됩니다.
events
dict <str, callable>
아니요
없음
이벤트 이름 키와 콜백 함수 값이 있는 선택적 개체입니다
environment_id
int
아니요
production
Target 환경 ID
환경
str
아니요
production
Target 환경 이름
cdn_environment
str
아니요
production
CDN 환경 이름
telemetry_enabled
부울
아니요
True
False로 설정하면 원격 분석 데이터가 Adobe (으)로 전송되지 않습니다
version
str
아니요
없음
이 SDK의 버전 번호

Python

from target_python_sdk import TargetClient

def client_ready_callback(ready_event):
    # make calls to Adobe Target

client_options = {
    "client": "acmeclient",
    "organization_id": "1234567890@AdobeOrg",
    "events": {
        "client_ready": client_ready_callback
    }
}
target_client = TargetClient.create(client_options)
recommendation-more-help
6906415f-169c-422b-89d3-7118e147c4e3