I am trying just simple connect to influxdb which started on localhost.
When I try just client:
influx --host 192.168.0.2 --port 8086
It works.
But when I try python:
import os
import json
from influxdb_client import InfluxDBClient, Point, WritePrecision
influxdb_url = os.environ['INFLUXDB_URL']
influxdb_host = os.environ['INFLUXDB_HOST']
influxdb_port = os.environ['INFLUXDB_PORT']
client = InfluxDBClient(url=influxdb_url)
I got exception
TypeError: __init__() missing 1 required positional argument: 'token'
But cli client can not connect without any tokens? Why do I need it in python? What token to use?