Skip to content

Commit a83c183

Browse files
committed
explain optional metadata arguments
1 parent b85b8e2 commit a83c183

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/adafruit_io_http/adafruit_io_batch_cpython.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@
6363
random_value, time_offset
6464
)
6565
)
66-
data.append({"value": random_value, "created_at": created_at.isoformat()})
66+
data.append(
67+
{
68+
"value": random_value,
69+
"created_at": created_at.isoformat(), # optional metadata like lat, lon, ele, etc
70+
}
71+
)
6772

6873
# Send the data to the feed as a single batch
6974
io.send_batch_data(temperature_feed["key"], data)

0 commit comments

Comments
 (0)