1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "contract": {
10 "format": "csv",
11 "delimiter": ",",
12 "columns": [
13 {
14 "name": "sku",
15 "type": "identifier",
16 "required": True,
17 "unique": True,
18 },
19 {
20 "name": "quantite",
21 "type": "integer",
22 "required": True,
23 "min": 0,
24 },
25 ],
26 },
27 "content": """sku,quantite
28DEMO-001,3
29DEMO-002,0
30""",
31}
32
33
34run = client.actor("honest_chainsaw/my-actor-3").call(run_input=run_input)
35
36
37print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
38for item in client.dataset(run.default_dataset_id).iterate_items():
39 print(item)
40
41