Skip to content

Commit c250e8e

Browse files
authored
Merge pull request #1 from matleg/patch-fix-example
fix: write 2 points in example.py
2 parents ab16384 + 170e6ff commit c250e8e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/example.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
# write using point structure
1515
write_api.write(bucket="my-bucket", record=p)
1616

17-
line_protocol = p.to_line_protocol()
17+
plp = Point("my_measurement").tag("location", "Athens").field("temperature", 35.3) \
18+
.time(datetime.now(tz=timezone.utc))
19+
line_protocol = plp.to_line_protocol()
1820
print(line_protocol)
1921

2022
# write using line protocol string

0 commit comments

Comments
 (0)