influxdata / influxdb-client-python

InfluxDB 2.0 python client
https://influxdb-client.readthedocs.io/en/stable/
MIT License
721 stars 187 forks source link

Support Cloud contract too #525

Closed dg-nvm closed 1 year ago

dg-nvm commented 2 years ago

Proposal:

Add cloud.json contract client so we can use all APIs

Current behavior:

Bucket Schemas api is not available

Desired behavior:

I can from influxdb_client import InfluxDBClientCloud as InfluxDBClient to activate all needed apis.

Alternatives considered:

pip install requests

Use case:

We are working in Vonage over feature that involves Explicit Bucket Schemas. We want to automate their management and we are using python influxdb client. Currently only oss.json contract is parsed and added so we have to use plain requests to maintain this and it's cumbersome.

bednar commented 2 years ago

Hi @dg-nvm,

thanks for using our client.

We don't want to add whole Cloud contract to the client, but the Bucket schemas API can be add separately. Is there any other API you need from Cloud contract?

Regards

bednar commented 2 years ago

We have to clearly promote in docs which APIs are only supported by InfluxDB Cloud. For more info see https://github.com/influxdata/influxdb-client-python/issues/527#issuecomment-1299693329

dg-nvm commented 2 years ago

@bednar for this moment I don't recognize other APIs, to be fair I did know that there is a diff between versions (like the inability to get a health check from the cloud version) but I didn't know that SDKs are also different.

bednar commented 1 year ago

Hi @dg-nvm,

I have prepared a fixed version within #528. If you would like to use this fixed version before regular release, please install client via:

pip install git+https://github.com/influxdata/influxdb-client-python.git@master

The following example shows how to use Explicit schema API: https://github.com/influxdata/influxdb-client-python/blob/master/examples/bucket_schemas.py

Regards

dg-nvm commented 1 year ago

thank you