From 170e6ffa23dd3b075a0dbe3362aa96017485cc82 Mon Sep 17 00:00:00 2001 From: matleg Date: Thu, 5 Dec 2024 14:39:07 +0100 Subject: [PATCH] fix: write 2 points in example.py --- examples/example.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/example.py b/examples/example.py index f6ac61f6..8bca7c1f 100644 --- a/examples/example.py +++ b/examples/example.py @@ -14,7 +14,9 @@ # write using point structure write_api.write(bucket="my-bucket", record=p) - line_protocol = p.to_line_protocol() + plp = Point("my_measurement").tag("location", "Athens").field("temperature", 35.3) \ + .time(datetime.now(tz=timezone.utc)) + line_protocol = plp.to_line_protocol() print(line_protocol) # write using line protocol string