Giter VIP home page Giter VIP logo

Comments (6)

bednar avatar bednar commented on May 14, 2024

Hi @pjdervan,

We have an example how to connect to InfluxDB 2.0 Cloud - influx_cloud.py example.

Try use client same way... something like this:

url = "https://eu-central-1-1.aws.cloud2.influxdata.com"
token = "eJfb567aSoJnoDZJRaTI48lgzafILzOEaW70CEQqStin4xm9mboyYQO7dLJWVwRBXyLbrje9nvI6aXMJN1HlCg=="
bucket = "Keithley2410"
org = "[email protected]"

client = InfluxDBClient(url=url, token=token)

point = Point(kind).tag('host', host).tag('device', device).field('value', 25.3).time(time=datetime.utcnow())

write_api = client.write_api(write_options=SYNCHRONOUS)
write_api.write(bucket=bucket, org=org, record=point)

client.close()

Regards

from influxdb-client-python.

pjdervan avatar pjdervan commented on May 14, 2024

from influxdb-client-python.

bednar avatar bednar commented on May 14, 2024

There is not an init file that should be set up.

Please, try validate token via:

curl -i -X POST 'http://localhost:9999/api/v2/write?org=my-org&bucket=my-bucket' \
    -H 'Authorization: Token my-token' \
    -d 'h2o,location=west level=1'

If you renamed your organization, bucket or something else try generate new token.

from influxdb-client-python.

pjdervan avatar pjdervan commented on May 14, 2024

from influxdb-client-python.

pjdervan avatar pjdervan commented on May 14, 2024

from influxdb-client-python.

bednar avatar bednar commented on May 14, 2024

No problem at all. I am glad that it works.

from influxdb-client-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.