1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "prd": {
9 "app_name": "Field Notes",
10 "package_name": "com.example.fieldnotes",
11 "description": "A small field-research capture app.",
12 "theme": "material",
13 "auth": True,
14 "models": [{
15 "name": "Observation",
16 "collection": "observations",
17 "fields": [
18 {
19 "name": "title",
20 "label": "Title",
21 "type": "text",
22 },
23 {
24 "name": "count",
25 "label": "Specimen count",
26 "type": "number",
27 },
28 {
29 "name": "verified",
30 "label": "Verified",
31 "type": "bool",
32 },
33 ],
34 }],
35 "screens": [
36 {
37 "id": "observations",
38 "title": "Observations",
39 "kind": "list",
40 "model": "Observation",
41 "actions": [{
42 "name": "openCapture",
43 "kind": "navigate",
44 "target": "capture",
45 }],
46 },
47 {
48 "id": "capture",
49 "title": "New observation",
50 "kind": "form",
51 "model": "Observation",
52 "actions": [{
53 "name": "saveObservation",
54 "kind": "create",
55 "target": "Observation",
56 }],
57 },
58 ],
59 } }
60
61
62run = client.actor("vigorous_spit/prd-to-flutter-apk").call(run_input=run_input)
63
64
65print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
66for item in client.dataset(run.default_dataset_id).iterate_items():
67 print(item)
68
69