Skip to content

Commit eaf1221

Browse files
author
Jay Clifford
committed
fixed major client bug
1 parent 80cf49f commit eaf1221

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

Examples/batching-example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def retry(self, conf, data: str, exception: InfluxDBError):
5959
with InfluxDBClient3.InfluxDBClient3(token=token,
6060
host=url,
6161
org=org,
62-
database=database, enable_gzip=True, write_client_options=wco) as _client:
62+
database=database, enable_gzip=True, _write_client_options=wco) as _client:
6363

6464

6565
# Creating iterator for one hour worth of data (6 sensor readings per

Examples/flight_options_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
host="b0c7cce5-8dbc-428e-98c6-7f996fb96467.a.influxdb.io",
1515
org="6a841c0c08328fb1",
1616
database="flightdemo",
17-
flight_client_options=flight_client_options(
17+
_flight_client_options=flight_client_options(
1818
tls_root_certs=cert))
1919

2020

Examples/pandas_write.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
client = InfluxDBClient3.InfluxDBClient3(
66
token="",
77
host="eu-central-1-1.aws.cloud2.influxdata.com",
8-
org="6a841c0c08328fb1",
9-
database="test",
10-
write_options="SYNCHRONOUS")
8+
org="",
9+
database="")
1110

1211

1312
# Create a dataframe

influxdb_client_3/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def __init__(
2727
org=None,
2828
database=None,
2929
token=None,
30-
write_client_options=None,
31-
flight_client_options=None,
30+
_write_client_options=None,
31+
_flight_client_options=None,
3232
**kwargs):
3333
"""
3434
This class provides an interface for interacting with an InfluxDB server, simplifying common operations such as writing, querying.
@@ -41,17 +41,17 @@ def __init__(
4141
"""
4242
self._org = org
4343
self._database = database
44-
self.write_client_options = write_client_options if write_client_options is not None else write_client_options(write_options=SYNCHRONOUS)
44+
self._write_client_options = _write_client_options if _write_client_options is not None else write_client_options(write_options=SYNCHRONOUS)
4545
self._client = _InfluxDBClient(
4646
url=f"https://{host}",
4747
token=token,
4848
org=self._org,
4949
**kwargs)
5050

5151
self._write_api = _WriteApi(
52-
self._client, **self.write_client_options)
52+
self._client, **self._write_client_options)
5353

54-
self._flight_client_options = flight_client_options if flight_client_options is not None else {}
54+
self._flight_client_options = _flight_client_options if _flight_client_options is not None else {}
5555
self._flight_client = FlightClient(
5656
f"grpc+tls://{host}:443",
5757
**self._flight_client_options)

0 commit comments

Comments
 (0)