Skip to content

Instantly share code, notes, and snippets.

@rahulbanerjee26
Created November 8, 2021 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulbanerjee26/c00d041334053556d04e9f1df8034662 to your computer and use it in GitHub Desktop.
Save rahulbanerjee26/c00d041334053556d04e9f1df8034662 to your computer and use it in GitHub Desktop.
InfluxDB Tutorial
from datetime import datetime
from dotenv import load_dotenv, main
import os
from influxdb_client import InfluxDBClient, Point, WritePrecision
from influxdb_client.client.write_api import SYNCHRONOUS
load_dotenv()
# You can generate a Token from the "Tokens Tab" in the UI
token = os.getenv('TOKEN')
org = os.getenv('ORG')
bucket = os.getenv('BUCKET')
client = InfluxDBClient(url="http://localhost:8086", token=token)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment