1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "calculations": [
9 {
10 "type": "pace",
11 "label": "Marathon goal pace",
12 "distance": "marathon",
13 "time": "3:45:00",
14 "splitEvery": 5,
15 "unit": "km",
16 },
17 {
18 "type": "time",
19 "label": "10K at 4:30 per km",
20 "distance": 10,
21 "unit": "km",
22 "pace": "4:30",
23 "paceUnit": "min/km",
24 "splits": False,
25 },
26 {
27 "type": "splits",
28 "label": "Half marathon negative split",
29 "distance": "half marathon",
30 "time": "1:45:00",
31 "splitEvery": 5,
32 "strategy": "negative",
33 "strategyPercent": 2,
34 },
35 {
36 "type": "predict",
37 "label": "Race times from a 22:30 5K",
38 "distance": "5k",
39 "time": "22:30",
40 },
41 {
42 "type": "training",
43 "label": "Training paces from a 22:30 5K",
44 "distance": "5k",
45 "time": "22:30",
46 },
47 {
48 "type": "convert",
49 "label": "8:00 per mile in other units",
50 "pace": "8:00",
51 "paceUnit": "min/mi",
52 },
53 ] }
54
55
56run = client.actor("mangudai/running-pace-calculator").call(run_input=run_input)
57
58
59print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
60for item in client.dataset(run["defaultDatasetId"]).iterate_items():
61 print(item)
62
63