1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "barcodes": [
10 {
11 "data": "012345678901",
12 "format": "EAN13",
13 "outputFormat": "PNG",
14 "label": "example-ean13",
15 },
16 {
17 "data": "Hello, World!",
18 "format": "CODE128",
19 "outputFormat": "PNG",
20 "label": "example-code128",
21 },
22 {
23 "data": "https://apify.com",
24 "format": "QR",
25 "outputFormat": "PNG",
26 "label": "example-qr",
27 },
28 ],
29 "outputFormat": "PNG",
30 "width": 300,
31 "height": 150,
32 "lineColor": "#000000",
33 "background": "#ffffff",
34 "includeText": True,
35 "fontSize": 20,
36 "margin": 10,
37 "qrErrorCorrection": "M",
38}
39
40
41run = client.actor("automation-lab/barcode-generator").call(run_input=run_input)
42
43
44print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
45for item in client.dataset(run["defaultDatasetId"]).iterate_items():
46 print(item)
47
48