Skip to content

Commit 6160c15

Browse files
authored
Merge pull request #14 from thetradedesk/speakeasy-sdk-regen-1773966528
chore: 🐝 Update SDK - Generate 0.1.5
2 parents 808ac71 + ca3bc5b commit 6160c15

12 files changed

Lines changed: 207 additions & 47 deletions

File tree

β€Ž.gitignoreβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ restructure.sh
3333
# AI
3434
.agents
3535
.claude
36-
.cursor
36+
.cursor

β€Ž.speakeasy/gen.lockβ€Ž

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
lockVersion: 2.0.0
22
id: 1927f304-b110-462d-9e13-326cfa243f23
33
management:
4-
docChecksum: 9260c9a9fcf8e3fad2bcb624796babf4
4+
docChecksum: 73ed2fc65d2e0f7b086658bb408f357f
55
docVersion: v0.1
6-
speakeasyVersion: 1.757.1
6+
speakeasyVersion: 1.758.0
77
generationVersion: 2.866.2
8-
releaseVersion: 0.1.4
9-
configChecksum: 6c521e80f7c42bc7e3b3e60b3eea2de7
8+
releaseVersion: 0.1.5
9+
configChecksum: fe79ffeb181eea654b09de007b2459ce
1010
repoURL: https://github.com/thetradedesk/ttd-data-python.git
1111
installationURL: https://github.com/thetradedesk/ttd-data-python.git
1212
published: true
1313
persistentEdits:
14-
generation_id: a29a7230-b031-42ac-afdd-764070815771
15-
pristine_commit_hash: db31f892e0dc3e63a2476dabd01ff346a0f27800
16-
pristine_tree_hash: 84cd6b4482d678b6573b4de3af90287adae33242
14+
generation_id: 77a4ea90-a850-4e6b-88bf-650a2a18e485
15+
pristine_commit_hash: b97f80d428612510e9b6db4ce5599409022ff90e
16+
pristine_tree_hash: 048c84ceb187cb6d7787d5d5652f5d3414c23e0b
1717
features:
1818
python:
1919
additionalDependencies: 1.0.0
@@ -296,8 +296,8 @@ trackedFiles:
296296
pristine_git_object: f456032107a9387ba6c98afd1c981df2f4b3d636
297297
pyproject.toml:
298298
id: 5d07e7d72637
299-
last_write_checksum: sha1:bdce178bcf75a9fda69e73b5e8b9cabcb36e6eaa
300-
pristine_git_object: cbb9f15f2b9d11c6e5686c2fb62d9146b447dd1a
299+
last_write_checksum: sha1:2b6077e82b345310e727c9baf21c68f62269f4df
300+
pristine_git_object: e811f0cce209845d3d500d5b2b3e424fd88cdd2b
301301
scripts/prepare_readme.py:
302302
id: e0c5957a6035
303303
last_write_checksum: sha1:a2b33b92e3f8fed0f4be1d661d68b6decdf9f525
@@ -324,8 +324,8 @@ trackedFiles:
324324
pristine_git_object: 232e51401d91ec209d9de0c41a959ffc37c2eadb
325325
src/ttd_data/_version.py:
326326
id: 7feb4586507e
327-
last_write_checksum: sha1:9f26133b0bcb817822e65532874cfda856d78842
328-
pristine_git_object: ea22a7f8b65ad56aa374131a5b926488b3eac6ac
327+
last_write_checksum: sha1:bf7b060945dce8ba36aa347414e4b60aabba5288
328+
pristine_git_object: fc584b03a80b7eb5b7baecf0e0b564ba1a7eab04
329329
src/ttd_data/advertiser.py:
330330
id: 392ead635b4f
331331
last_write_checksum: sha1:36d9b5902e62972e93e01502546c9b3b95fe6015
@@ -560,8 +560,8 @@ trackedFiles:
560560
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
561561
src/ttd_data/sdk.py:
562562
id: 1472df75b98c
563-
last_write_checksum: sha1:3336e44e0d4d73f92b77c6e644542c0c54aaf4b8
564-
pristine_git_object: ac6c4b9281aabee107e8abcef4a5a532b00099fb
563+
last_write_checksum: sha1:7cd0bbdc4f900cafd92c586eba4993a9e4ab4cb7
564+
pristine_git_object: ef876ef0c3dedce71077660f368c5ae17d405b26
565565
src/ttd_data/sdkconfiguration.py:
566566
id: 6c07cde690cd
567567
last_write_checksum: sha1:26e46bae867f574d959614353000d3a9ab0df8e0

β€Ž.speakeasy/gen.yamlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ generation:
3434
generateNewTests: false
3535
skipResponseBodyAssertions: false
3636
python:
37-
version: 0.1.4
37+
version: 0.1.5
3838
additionalDependencies:
3939
dev: {}
4040
main: {}

β€Ž.speakeasy/out.openapi.yamlβ€Ž

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@ openapi: "3.0.4"
22
info:
33
title: "TTD Data API"
44
version: "v0.1"
5+
description: |
6+
Python SDK for The Trade Desk Data API. Provides operations for ingesting advertiser data,
7+
third-party data, and offline conversions, as well as handling data subject deletion and opt-out requests.
8+
9+
For more information, see the official API documentation:
10+
- [Advertiser targeting data (1PD)](https://open.thetradedesk.com/advertiser/docsApp/GuidesAdvertiser/data/doc/post-data-advertiser-firstparty)
11+
- [Third-party targeting data (3PD)](https://open.thetradedesk.com/provider/docsApp/GuidesProvider/audience/doc/post-data-thirdparty)
12+
- [Offline conversions (CAPI)](https://open.thetradedesk.com/advertiser/docsApp/GuidesAdvertiser/data/doc/post-providerapi-offlineconversion)
13+
14+
Deletions and opt-outs:
15+
- [Advertiser](https://open.thetradedesk.com/advertiser/docsApp/GuidesAdvertiser/data/doc/post-data-deletion-optout-advertiser)
16+
- [Third party](https://open.thetradedesk.com/provider/docsApp/GuidesProvider/audience/doc/post-data-deletion-optout-thirdparty)
17+
- [Merchant](https://open.thetradedesk.com/provider/docsApp/GuidesProvider/retail/doc/post-data-deletion-optout-merchant)
518
paths:
619
/data/advertiser:
720
post:

β€Ž.speakeasy/workflow.lockβ€Ž

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
speakeasyVersion: 1.757.1
1+
speakeasyVersion: 1.758.0
22
sources:
33
Data API:
44
sourceNamespace: data-api
5-
sourceRevisionDigest: sha256:aebe4e13b656034ebcdeca2316fe9ef68f1e1722135fe3f4f6f4cc0fcfc8e038
6-
sourceBlobDigest: sha256:c60e594327b79deb823bb3cb024e57044c722b934bec348d81db549fe43027f5
5+
sourceRevisionDigest: sha256:805d2cf7ee7dc154259418b5b9043635cafd034e4b4864cd81ed293a923de585
6+
sourceBlobDigest: sha256:86fe2e24c60fa9c34453b182217f3a60b7e0889fc28cbf7fae8eb8e7bef6bdbf
77
tags:
88
- latest
99
- v0.1
1010
targets:
1111
data-api:
1212
source: Data API
1313
sourceNamespace: data-api
14-
sourceRevisionDigest: sha256:aebe4e13b656034ebcdeca2316fe9ef68f1e1722135fe3f4f6f4cc0fcfc8e038
15-
sourceBlobDigest: sha256:c60e594327b79deb823bb3cb024e57044c722b934bec348d81db549fe43027f5
14+
sourceRevisionDigest: sha256:805d2cf7ee7dc154259418b5b9043635cafd034e4b4864cd81ed293a923de585
15+
sourceBlobDigest: sha256:86fe2e24c60fa9c34453b182217f3a60b7e0889fc28cbf7fae8eb8e7bef6bdbf
1616
codeSamplesNamespace: data-api-python-code-samples
17-
codeSamplesRevisionDigest: sha256:a75b301f2491ee857cd37755478b429ed5ac467f5bd8f19bfeeb9d996e3781ea
17+
codeSamplesRevisionDigest: sha256:44fe68c3294d1f45776f998f2081f6d0da511ed510c69d2aa179feb010d54caf
1818
workflow:
1919
workflowVersion: 1.0.0
2020
speakeasyVersion: latest

β€ŽREADME-PYPI.mdβ€Ž

Lines changed: 131 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,23 @@ Developer-friendly & type-safe Python SDK specifically catered to leverage *ttd-
66
[![License: MIT](https://img.shields.io/badge/LICENSE_//_MIT-3b5bdb?style=for-the-badge&labelColor=eff6ff)](https://mit-license.org/)
77

88

9-
<br /><br />
10-
> [!IMPORTANT]
11-
> This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/thetradedesk/data-api). Delete this section before > publishing to a package manager.
9+
1210

1311
<!-- Start Summary [summary] -->
1412
## Summary
1513

14+
TTD Data API: Python SDK for The Trade Desk Data API. Provides operations for ingesting advertiser data,
15+
third-party data, and offline conversions, as well as handling data subject deletion and opt-out requests.
16+
17+
For more information, see the official API documentation:
18+
- [Advertiser targeting data (1PD)](https://open.thetradedesk.com/advertiser/docsApp/GuidesAdvertiser/data/doc/post-data-advertiser-firstparty)
19+
- [Third-party targeting data (3PD)](https://open.thetradedesk.com/provider/docsApp/GuidesProvider/audience/doc/post-data-thirdparty)
20+
- [Offline conversions (CAPI)](https://open.thetradedesk.com/advertiser/docsApp/GuidesAdvertiser/data/doc/post-providerapi-offlineconversion)
1621

22+
Deletions and opt-outs:
23+
- [Advertiser](https://open.thetradedesk.com/advertiser/docsApp/GuidesAdvertiser/data/doc/post-data-deletion-optout-advertiser)
24+
- [Third party](https://open.thetradedesk.com/provider/docsApp/GuidesProvider/audience/doc/post-data-deletion-optout-thirdparty)
25+
- [Merchant](https://open.thetradedesk.com/provider/docsApp/GuidesProvider/retail/doc/post-data-deletion-optout-merchant)
1726
<!-- End Summary [summary] -->
1827

1928
<!-- Start Table of Contents [toc] -->
@@ -111,49 +120,151 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
111120
- [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
112121
<!-- End IDE Support [idesupport] -->
113122

114-
<!-- Start SDK Example Usage [usage] -->
115123
## SDK Example Usage
116124

117-
### Example
125+
### 1. Advertiser targeting Data (1PD)
118126

119127
```python
120-
# Synchronous Example
121-
from ttd_data import DataClient
128+
from ttd_data import DataClient, models
129+
130+
with DataClient() as client:
131+
response = client.advertiser.ingest_advertiser_data(
132+
ttd_auth=TTD_AUTH_TOKEN,
133+
advertiser_id=ADVERTISER_ID,
134+
items=[
135+
models.AdvertiserDataItem(
136+
tdid="<TDID>",
137+
data=[
138+
models.AdvertiserData(name="loyalty_members"),
139+
],
140+
)
141+
],
142+
)
122143

144+
```
123145

124-
with DataClient() as data_client:
146+
### 2. Third Party Targeting Data (3PD)
125147

126-
res = data_client.advertiser.ingest_advertiser_data(ttd_auth="<value>", advertiser_id="<id>")
148+
```python
149+
from ttd_data import DataClient, models
150+
151+
with DataClient() as client:
152+
response = client.third_party.ingest_third_party_data(
153+
ttd_auth=TTD_AUTH_TOKEN,
154+
data_provider_id=DATA_PROVIDER_ID,
155+
items=[
156+
models.ThirdPartyDataItem(
157+
tdid="<TDID>",
158+
data=[
159+
models.ThirdPartyData(name="in_market_auto"),
160+
],
161+
)
162+
],
163+
)
164+
```
127165

128-
assert res.advertiser_data_server_response is not None
166+
### 3. Offline Conversions Data (CAPI)
129167

130-
# Handle response
131-
print(res.advertiser_data_server_response)
168+
```python
169+
from ttd_data import DataClient, models
170+
171+
with DataClient() as client:
172+
response = client.offline_conversion.ingest_offline_conversion_data(
173+
ttd_auth=TTD_AUTH_TOKEN,
174+
data_provider_id=DATA_PROVIDER_ID,
175+
items=[
176+
models.OfflineConversionDataItem(
177+
tracking_tag_id=TRACKING_TAG_ID,
178+
timestamp_utc=datetime.now(timezone.utc),
179+
tdid="<TDID>",
180+
)
181+
],
182+
)
183+
```
184+
185+
### 4. Optouts and Deletion - Advertiser - Data Subject Request
186+
187+
```python
188+
from ttd_data import DataClient, models
189+
190+
with DataClient() as client:
191+
response = client.deletion_opt_out.data_subject_request_advertiser_data(
192+
ttd_auth=TTD_AUTH_TOKEN,
193+
advertiser_id=ADVERTISER_ID,
194+
request_type=models.PartnerDsrRequestType.DELETION,
195+
items=[
196+
models.PartnerDsrDataItem(tdid="<TDID>"),
197+
models.PartnerDsrDataItem(daid="<DAID>"),
198+
models.PartnerDsrDataItem(euid="<EUID>"),
199+
],
200+
)
201+
```
202+
203+
### 5. Optouts and Deletion - Data Provider - Data Subject Request
204+
205+
```python
206+
from ttd_data import DataClient, models
207+
208+
with DataClient() as client:
209+
response = client.deletion_opt_out.data_subject_request_third_party_data(
210+
ttd_auth=TTD_AUTH_TOKEN,
211+
data_provider_id=DATA_PROVIDER_ID,
212+
request_type=models.PartnerDsrRequestType.OPT_OUT,
213+
items=[
214+
models.PartnerDsrDataItem(tdid="<TDID>"),
215+
models.PartnerDsrDataItem(ramp_id="<RAMP_ID>"),
216+
],
217+
)
218+
```
219+
220+
### 6. Optouts and Deletion - Merchant - Data Subject Request
221+
222+
```python
223+
from ttd_data import DataClient, models
224+
225+
with DataClient() as client:
226+
response = client.deletion_opt_out.data_subject_request_merchant_data(
227+
ttd_auth=TTD_AUTH_TOKEN,
228+
merchant_id=MERCHANT_ID,
229+
request_type=models.PartnerDsrRequestType.DELETION,
230+
items=[
231+
models.PartnerDsrDataItem(tdid="<TDID>"),
232+
],
233+
)
132234
```
133235

134-
</br>
236+
237+
### 7. Async usage
135238

136239
The same SDK client can also be used to make asynchronous requests by importing asyncio.
137240

138241
```python
139242
# Asynchronous Example
140243
import asyncio
141-
from ttd_data import DataClient
244+
from ttd_data import DataClient, models
142245

143246
async def main():
144247

145248
async with DataClient() as data_client:
146-
147-
res = await data_client.advertiser.ingest_advertiser_data_async(ttd_auth="<value>", advertiser_id="<id>")
148-
149-
assert res.advertiser_data_server_response is not None
249+
response = client.advertiser.ingest_advertiser_data(
250+
ttd_auth=TTD_AUTH_TOKEN,
251+
advertiser_id=ADVERTISER_ID,
252+
items=[
253+
models.AdvertiserDataItem(
254+
tdid="<TDID>",
255+
data=[
256+
models.AdvertiserData(name="loyalty_members"),
257+
],
258+
)
259+
],
260+
)
150261

151262
# Handle response
152-
print(res.advertiser_data_server_response)
263+
print(response.advertiser_data_server_response)
153264

154265
asyncio.run(main())
155266
```
156-
<!-- End SDK Example Usage [usage] -->
267+
<!-- No SDK Example Usage [usage] -->
157268

158269
<!-- Start Available Resources and Operations [operations] -->
159270
## Available Resources and Operations

β€ŽREADME.mdβ€Ž

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,18 @@ Developer-friendly & type-safe Python SDK specifically catered to leverage *ttd-
1111
<!-- Start Summary [summary] -->
1212
## Summary
1313

14-
14+
TTD Data API: Python SDK for The Trade Desk Data API. Provides operations for ingesting advertiser data,
15+
third-party data, and offline conversions, as well as handling data subject deletion and opt-out requests.
16+
17+
For more information, see the official API documentation:
18+
- [Advertiser targeting data (1PD)](https://open.thetradedesk.com/advertiser/docsApp/GuidesAdvertiser/data/doc/post-data-advertiser-firstparty)
19+
- [Third-party targeting data (3PD)](https://open.thetradedesk.com/provider/docsApp/GuidesProvider/audience/doc/post-data-thirdparty)
20+
- [Offline conversions (CAPI)](https://open.thetradedesk.com/advertiser/docsApp/GuidesAdvertiser/data/doc/post-providerapi-offlineconversion)
21+
22+
Deletions and opt-outs:
23+
- [Advertiser](https://open.thetradedesk.com/advertiser/docsApp/GuidesAdvertiser/data/doc/post-data-deletion-optout-advertiser)
24+
- [Third party](https://open.thetradedesk.com/provider/docsApp/GuidesProvider/audience/doc/post-data-deletion-optout-thirdparty)
25+
- [Merchant](https://open.thetradedesk.com/provider/docsApp/GuidesProvider/retail/doc/post-data-deletion-optout-merchant)
1526
<!-- End Summary [summary] -->
1627

1728
<!-- Start Table of Contents [toc] -->

β€ŽRELEASES.mdβ€Ž

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,14 @@ Based on:
5858
### Generated
5959
- [python v0.1.4] .
6060
### Releases
61-
- [PyPI v0.1.4] https://pypi.org/project/ttd-data/0.1.4 - .
61+
- [PyPI v0.1.4] https://pypi.org/project/ttd-data/0.1.4 - .
62+
63+
## 2026-03-20 00:28:29
64+
### Changes
65+
Based on:
66+
- OpenAPI Doc
67+
- Speakeasy CLI 1.758.0 (2.866.2) https://github.com/speakeasy-api/speakeasy
68+
### Generated
69+
- [python v0.1.5] .
70+
### Releases
71+
- [PyPI v0.1.5] https://pypi.org/project/ttd-data/0.1.5 - .

β€Žpyproject.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ttd-data"
3-
version = "0.1.4"
3+
version = "0.1.5"
44
description = "Python Client SDK for TTD Data API."
55
authors = [{ name = "Speakeasy" },]
66
readme = "README-PYPI.md"

β€Žsrc/ttd_data/_version.pyβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import importlib.metadata
44

55
__title__: str = "ttd-data"
6-
__version__: str = "0.1.4"
6+
__version__: str = "0.1.5"
77
__openapi_doc_version__: str = "v0.1"
88
__gen_version__: str = "2.866.2"
9-
__user_agent__: str = "speakeasy-sdk/python 0.1.4 2.866.2 v0.1 ttd-data"
9+
__user_agent__: str = "speakeasy-sdk/python 0.1.5 2.866.2 v0.1 ttd-data"
1010

1111
try:
1212
if __package__ is not None:

0 commit comments

Comments
Β (0)