influxdb3-python 0.11.0__tar.gz → 0.13.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. influxdb3_python-0.13.0/Examples/basic_ssl_example.py +102 -0
  2. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/Examples/batching_example.py +0 -1
  3. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/Examples/cloud_dedicated_query.py +0 -1
  4. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/Examples/cloud_dedicated_write.py +0 -1
  5. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/Examples/config.py +0 -1
  6. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/Examples/flight_options_example.py +0 -1
  7. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/Examples/handle_http_error.py +0 -1
  8. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/Examples/pandas_write.py +0 -1
  9. influxdb3_python-0.13.0/Examples/query_async.py +86 -0
  10. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/Examples/query_type.py +0 -1
  11. {influxdb3_python-0.11.0/influxdb3_python.egg-info → influxdb3_python-0.13.0}/PKG-INFO +7 -12
  12. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/README.md +4 -10
  13. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0/influxdb3_python.egg-info}/PKG-INFO +7 -12
  14. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb3_python.egg-info/SOURCES.txt +2 -0
  15. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/__init__.py +173 -6
  16. influxdb3_python-0.13.0/influxdb_client_3/query/query_api.py +252 -0
  17. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/version.py +1 -1
  18. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/__init__.py +0 -10
  19. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/_sync/api_client.py +43 -25
  20. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/_sync/rest.py +0 -20
  21. {influxdb3_python-0.11.0/influxdb_client_3/write_client/client/write → influxdb3_python-0.13.0/influxdb_client_3/write_client/client}/__init__.py +0 -10
  22. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/_base.py +10 -6
  23. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/influxdb_client.py +9 -5
  24. {influxdb3_python-0.11.0/influxdb_client_3/write_client/client → influxdb3_python-0.13.0/influxdb_client_3/write_client/client/write}/__init__.py +0 -10
  25. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/write_api.py +16 -3
  26. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/configuration.py +10 -24
  27. influxdb3_python-0.13.0/influxdb_client_3/write_client/domain/__init__.py +10 -0
  28. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/domain/write_precision.py +0 -16
  29. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/rest.py +0 -14
  30. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/service/__init__.py +0 -12
  31. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/service/signin_service.py +0 -16
  32. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/service/signout_service.py +0 -16
  33. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/service/write_service.py +0 -16
  34. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/tests/test_api_client.py +22 -0
  35. influxdb3_python-0.13.0/tests/test_influxdb_client_3.py +147 -0
  36. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/tests/test_influxdb_client_3_integration.py +94 -4
  37. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/tests/test_polars.py +11 -4
  38. influxdb3_python-0.13.0/tests/test_query.py +432 -0
  39. influxdb3_python-0.11.0/influxdb_client_3/query/query_api.py +0 -108
  40. influxdb3_python-0.11.0/influxdb_client_3/write_client/domain/__init__.py +0 -19
  41. influxdb3_python-0.11.0/tests/test_influxdb_client_3.py +0 -53
  42. influxdb3_python-0.11.0/tests/test_query.py +0 -166
  43. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/Examples/__init__.py +0 -0
  44. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/LICENSE +0 -0
  45. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb3_python.egg-info/dependency_links.txt +0 -0
  46. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb3_python.egg-info/requires.txt +0 -0
  47. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb3_python.egg-info/top_level.txt +0 -0
  48. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/py.typed +0 -0
  49. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/query/__init__.py +0 -0
  50. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/read_file.py +0 -0
  51. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/_sync/__init__.py +0 -0
  52. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/exceptions.py +0 -0
  53. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/logging_handler.py +0 -0
  54. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/util/__init__.py +0 -0
  55. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/util/date_utils.py +0 -0
  56. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/util/date_utils_pandas.py +0 -0
  57. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/util/helpers.py +0 -0
  58. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/util/multiprocessing_helper.py +0 -0
  59. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/warnings.py +0 -0
  60. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/write/dataframe_serializer.py +0 -0
  61. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/write/point.py +0 -0
  62. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/write/polars_dataframe_serializer.py +0 -0
  63. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/client/write/retry.py +0 -0
  64. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/extras.py +0 -0
  65. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/influxdb_client_3/write_client/service/_base_service.py +0 -0
  66. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/setup.cfg +0 -0
  67. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/setup.py +0 -0
  68. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/tests/test_dataframe_serializer.py +0 -0
  69. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/tests/test_date_helper.py +0 -0
  70. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/tests/test_deep_merge.py +0 -0
  71. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/tests/test_merge_options.py +0 -0
  72. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/tests/test_point.py +0 -0
  73. {influxdb3_python-0.11.0 → influxdb3_python-0.13.0}/tests/test_write_file.py +0 -0
@@ -0,0 +1,102 @@
1
+ import os
2
+ import time
3
+
4
+ import pyarrow
5
+
6
+ from config import Config
7
+ from influxdb_client_3 import InfluxDBClient3
8
+
9
+ bad_cert = """-----BEGIN CERTIFICATE-----
10
+ MIIFDTCCAvWgAwIBAgIUYzpfisy9xLrhiZd+D9vOdzC3+iswDQYJKoZIhvcNAQEL
11
+ BQAwFjEUMBIGA1UEAwwLdGVzdGhvc3QuaW8wHhcNMjUwMjI4MTM1NTMyWhcNMzUw
12
+ MjI2MTM1NTMyWjAWMRQwEgYDVQQDDAt0ZXN0aG9zdC5pbzCCAiIwDQYJKoZIhvcN
13
+ AQEBBQADggIPADCCAgoCggIBAN1lwqXYP8UMvjb56SpUEj2OpoEDRfLeWrEiHkOl
14
+ xoymvJGaXZNEpDXo2TTdysCoYWEjz9IY6GlqSo2Yssf5BZkQwMOw7MdyRwCigzrh
15
+ OAKbyCfsvEgfNFrXEdSDpaxW++5SToeErudYXc+sBfnI1NB4W3GBGqqIvx8fqaB3
16
+ 1EU9ql2sKKxI0oYIQD/If9rQEyLFKeWdD8iT6YST1Vugkvd34NPmaqV5+pjdSb4z
17
+ a8olavwUoslqFUeILqIq+WZZbOlgCcJYKcBAmELRnsxGaABRtMwMZx+0D+oKo4Kl
18
+ QQtOcER+RHkBHyYFghZIBnzudfbP9NadknOz3AilJbJolXfXJqeQhRD8Ob49kkhe
19
+ OwjAppHnaZGWjYZMLIfnwwXBwkS7bSwF16Wot83cpL46Xvg6xcl12An4JaoF798Q
20
+ cXyYrWCgvbqjVR7694gxqLGzk138AKTDSbER1h1rfqCqkk7soE0oWCs7jiCk2XvD
21
+ 49qVfHtd50KYJ4/yP1XL0PmLL0Hw1kvOxLVkFENc1zkoYXJRt2Ec6j9dajmGlsFn
22
+ 0bLLap6UIlIGQFuvcLf4bvsIi9FICy2jBjaIdM4UAWbReG+52+180HEleAwi5bAN
23
+ HY61WVXc4X+N0E2y8HWc1QaRioU7R4XZ5HXKs7OTWkKFZUU2JDFHAKdiiAU78qLU
24
+ 7GApAgMBAAGjUzBRMB0GA1UdDgQWBBT2vPFo0mzh9ls4xJUiAgSK+B5LpTAfBgNV
25
+ HSMEGDAWgBT2vPFo0mzh9ls4xJUiAgSK+B5LpTAPBgNVHRMBAf8EBTADAQH/MA0G
26
+ CSqGSIb3DQEBCwUAA4ICAQC4TJNPx476qhiMi8anISv9lo9cnLju+qNhcz7wupBH
27
+ 3Go6bVQ7TCbSt2QpAyY64mdnRqHsXeGvZXCnabOpeKRDeAPBtRjc6yNKuXybqFtn
28
+ W3PZEs/OYc659TUA+MoBzSXYStN9yiiYXyVFqVn+Rw6kM9tKh0GgAU7f5P+8IGuR
29
+ gXJbCjkbdJO7JUiVGEEmkjUHyqFxMHaZ8V6uazs52qIFyt7OYQTeV9HdoW8D9vAt
30
+ GfzYwzRDzbsZeIJqqDzLe7NOyxEyqZHCbtNpGcOyaLOl7ZBS52WsqaUZtL+9PjqD
31
+ 2TWj4WUFkOWQpTvWKHqM6//Buv4GjnTBShQKm+h+rxcGkdRMF6/sKwxPbr39P3RJ
32
+ TMfJA3u5UuowT44VaA2jkQzqIbxH9+3EA+0qPbqPJchOSr0pHSncqvR9FYcr7ayN
33
+ b6UDFnjeliyEqqksUO0arbvaO9FfB0kH8lU1NOKaQNO++Xj69GZMC6s721cNdad0
34
+ qqcdtyXWeOBBchguYDrSUIgLnUTHEwwzOmcNQ36hO5eX282BJy3ZLT3JU6MJopjz
35
+ vkbDDAxSrpZMcaoAWSrxgJAETeYiO4YbfORIzPkwdUkEIr6XY02Pi7MdkDGQ5hiB
36
+ TavA8+oXRa4b9BR3bCWcg8S/t4uOTTLkeTcQbONPh5A5IRySLCU+CwqB+/+VlO8X
37
+ Aw==
38
+ -----END CERTIFICATE-----"""
39
+
40
+
41
+ def write_cert(cert, file_name):
42
+ f = open(file_name, "w")
43
+ f.write(cert)
44
+ f.close()
45
+
46
+
47
+ def remove_cert(file_name):
48
+ os.remove(file_name)
49
+
50
+
51
+ def print_results(results: list):
52
+ print("%-6s%-6s%-6s%-24s" % ("id", "speed", "ticks", "time"))
53
+ for result in results:
54
+ print("%-6s%-6.2f%-6i%-24s" % (result['id'], result['speed'], result['ticks'], result['time']))
55
+
56
+
57
+ def main() -> None:
58
+ print("Main")
59
+ temp_cert_file = "temp_cert.pem"
60
+ conf = Config()
61
+
62
+ write_and_query_with_explicit_sys_cert(conf)
63
+
64
+ write_cert(bad_cert, temp_cert_file)
65
+ query_with_verify_ssl_off(conf, temp_cert_file)
66
+ remove_cert(temp_cert_file)
67
+
68
+
69
+ def write_and_query_with_explicit_sys_cert(conf):
70
+ print("\nwrite and query with typical linux system cert\n")
71
+ with InfluxDBClient3(token=conf.token,
72
+ host=conf.host,
73
+ database=conf.database,
74
+ ssl_ca_cert="/etc/ssl/certs/ca-certificates.crt",
75
+ verify_ssl=True) as _client:
76
+ now = time.time_ns()
77
+ lp = f"escooter,id=zx80 speed=3.14,ticks=42i {now - (10 * 1_000_000_000)}"
78
+ _client.write(lp)
79
+
80
+ query = "SELECT * FROM \"escooter\" ORDER BY time DESC"
81
+ reader: pyarrow.Table = _client.query(query, mode="")
82
+ print_results(reader.to_pylist())
83
+
84
+
85
+ def query_with_verify_ssl_off(conf, cert):
86
+ print("\nquerying with verify_ssl off\n")
87
+
88
+ # Note that the passed root cert above is bad
89
+ # Switch verify_ssl to True to throw SSL_ERROR_SSL
90
+ with InfluxDBClient3(token=conf.token,
91
+ host=conf.host,
92
+ database=conf.database,
93
+ ssl_ca_cert=cert,
94
+ verify_ssl=False) as _client:
95
+
96
+ query = "SELECT * FROM \"escooter\" ORDER BY time DESC"
97
+ reader: pyarrow.Table = _client.query(query, mode="")
98
+ print_results(reader.to_pylist())
99
+
100
+
101
+ if __name__ == "__main__":
102
+ main()
@@ -70,7 +70,6 @@ def main() -> None:
70
70
  # of 10k ms and gzip compression
71
71
  with InfluxDBClient3.InfluxDBClient3(token=conf.token,
72
72
  host=conf.host,
73
- org=conf.org,
74
73
  database=conf.database,
75
74
  enable_gzip=True,
76
75
  write_client_options=wco) as _client:
@@ -6,7 +6,6 @@ config = Config()
6
6
  client = InfluxDBClient3.InfluxDBClient3(
7
7
  token=config.token,
8
8
  host=config.host,
9
- org=config.org,
10
9
  database=config.database)
11
10
 
12
11
  table = client.query(
@@ -9,7 +9,6 @@ config = Config()
9
9
  client = InfluxDBClient3.InfluxDBClient3(
10
10
  token=config.token,
11
11
  host=config.host,
12
- org=config.org,
13
12
  database=config.database,
14
13
  write_options=WriteOptions(
15
14
  batch_size=500,
@@ -6,7 +6,6 @@ class Config:
6
6
  def __init__(self):
7
7
  self.host = os.getenv('INFLUXDB_HOST') or 'https://us-east-1-1.aws.cloud2.influxdata.com/'
8
8
  self.token = os.getenv('INFLUXDB_TOKEN') or 'my-token'
9
- self.org = os.getenv('INFLUXDB_ORG') or 'my-org'
10
9
  self.database = os.getenv('INFLUXDB_DATABASE') or 'my-db'
11
10
 
12
11
  def __str__(self):
@@ -10,7 +10,6 @@ print(cert)
10
10
  client = InfluxDBClient3.InfluxDBClient3(
11
11
  token="",
12
12
  host="b0c7cce5-8dbc-428e-98c6-7f996fb96467.a.influxdb.io",
13
- org="6a841c0c08328fb1",
14
13
  database="flightdemo",
15
14
  flight_client_options=flight_client_options(
16
15
  tls_root_certs=cert))
@@ -18,7 +18,6 @@ def main() -> None:
18
18
  client = InfluxDBClient3.InfluxDBClient3(
19
19
  host=config.host,
20
20
  token=config.token,
21
- org=config.org,
22
21
  database=config.database
23
22
  )
24
23
 
@@ -5,7 +5,6 @@ import numpy as np
5
5
  client = InfluxDBClient3.InfluxDBClient3(
6
6
  token="",
7
7
  host="eu-central-1-1.aws.cloud2.influxdata.com",
8
- org="",
9
8
  database="")
10
9
 
11
10
 
@@ -0,0 +1,86 @@
1
+ import asyncio
2
+ import random
3
+ import time
4
+
5
+ import pandas
6
+
7
+ from influxdb_client_3 import InfluxDBClient3
8
+
9
+ from config import Config
10
+
11
+
12
+ async def fibio(iterations, grit=0.5):
13
+ """
14
+ example coroutine to run parallel with query_async
15
+ :param iterations:
16
+ :param grit:
17
+ :return:
18
+ """
19
+ n0 = 1
20
+ n1 = 1
21
+ vals = [n0, n1]
22
+ for _ in range(iterations):
23
+ val = n0 + n1
24
+ n0 = n1
25
+ n1 = val
26
+ print(val)
27
+ vals.append(val)
28
+ await asyncio.sleep(grit)
29
+ return vals
30
+
31
+
32
+ def write_data(client: InfluxDBClient3, measurement):
33
+ """
34
+ Synchronous write - only for preparing data
35
+ :param client:
36
+ :param measurement:
37
+ :return:
38
+ """
39
+ ids = ['s3b1', 'dq41', 'sgw22']
40
+ lp_template = f"{measurement},id=%s speed=%f,alt=%f,bearing=%f %d"
41
+ data_size = 10
42
+ data = []
43
+ interval = 10 * 1_000_000_000
44
+ ts = time.time_ns() - (interval * data_size)
45
+ for _ in range(data_size):
46
+ data.append(lp_template % (ids[random.randint(0, len(ids) - 1)],
47
+ random.random() * 300,
48
+ random.random() * 2000,
49
+ random.random() * 360, ts))
50
+ ts += interval
51
+
52
+ client.write(data)
53
+
54
+
55
+ async def query_data(client: InfluxDBClient3, measurement):
56
+ """
57
+ Query asynchronously - should not block other coroutines
58
+ :param client:
59
+ :param measurement:
60
+ :return:
61
+ """
62
+ query = f"SELECT * FROM \"{measurement}\" WHERE time >= now() - interval '5 minutes' ORDER BY time DESC"
63
+ print(f"query start: {pandas.Timestamp(time.time_ns())}")
64
+ table = await client.query_async(query)
65
+ print(f"query returned: {pandas.Timestamp(time.time_ns())}")
66
+ return table.to_pandas()
67
+
68
+
69
+ async def main():
70
+ config = Config()
71
+ client = InfluxDBClient3(
72
+ host=config.host,
73
+ token=config.token,
74
+ database=config.database,
75
+ )
76
+ measurement = 'example_uav'
77
+ write_data(client, measurement)
78
+
79
+ # run both coroutines simultaneously
80
+ result = await asyncio.gather(fibio(10, 0.2), query_data(client, measurement))
81
+ print(f"fibio sequence = {result[0]}")
82
+ print(f"data set =\n{result[1]}")
83
+
84
+
85
+ if __name__ == "__main__":
86
+ asyncio.run(main())
@@ -3,7 +3,6 @@ import influxdb_client_3 as InfluxDBClient3
3
3
  client = InfluxDBClient3.InfluxDBClient3(
4
4
  token="",
5
5
  host="eu-central-1-1.aws.cloud2.influxdata.com",
6
- org="6a841c0c08328fb1",
7
6
  database="factory")
8
7
 
9
8
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: influxdb3-python
3
- Version: 0.11.0
3
+ Version: 0.13.0
4
4
  Summary: Community Python client for InfluxDB 3.0
5
5
  Home-page: https://github.com/InfluxCommunity/influxdb3-python
6
6
  Author: InfluxData
@@ -39,6 +39,7 @@ Dynamic: classifier
39
39
  Dynamic: description
40
40
  Dynamic: description-content-type
41
41
  Dynamic: home-page
42
+ Dynamic: license-file
42
43
  Dynamic: provides-extra
43
44
  Dynamic: requires-dist
44
45
  Dynamic: requires-python
@@ -103,13 +104,11 @@ from influxdb_client_3 import InfluxDBClient3, Point
103
104
 
104
105
  ## Initialization
105
106
  If you are using InfluxDB Cloud, then you should note that:
106
- 1. You will need to supply your org id, this is not necessary for InfluxDB Dedicated.
107
- 2. Use bucket name for the `database` argument.
107
+ 1. Use bucket name for the `database` argument.
108
108
 
109
109
  ```python
110
110
  client = InfluxDBClient3(token="your-token",
111
111
  host="your-host",
112
- org="your-org",
113
112
  database="your-database")
114
113
  ```
115
114
 
@@ -170,7 +169,6 @@ wco = write_client_options(success_callback=callback.success,
170
169
  with InfluxDBClient3.InfluxDBClient3(
171
170
  token="INSERT_TOKEN",
172
171
  host="eu-central-1-1.aws.cloud2.influxdata.com",
173
- org="6a841c0c08328fb1",
174
172
  database="python", write_client_options=wco) as client:
175
173
 
176
174
 
@@ -217,27 +215,24 @@ Install `certifi`
217
215
  pip install certifi
218
216
  ```
219
217
  Next include certifi within the flight client options:
218
+
220
219
  ```python
220
+ import certifi
221
+
221
222
  import influxdb_client_3 as InfluxDBClient3
222
- import pandas as pd
223
- import numpy as np
224
223
  from influxdb_client_3 import flight_client_options
225
- import certifi
226
224
 
227
225
  fh = open(certifi.where(), "r")
228
226
  cert = fh.read()
229
227
  fh.close()
230
228
 
231
-
232
229
  client = InfluxDBClient3.InfluxDBClient3(
233
230
  token="",
234
231
  host="b0c7cce5-8dbc-428e-98c6-7f996fb96467.a.influxdb.io",
235
- org="6a841c0c08328fb1",
236
232
  database="flightdemo",
237
233
  flight_client_options=flight_client_options(
238
234
  tls_root_certs=cert))
239
235
 
240
-
241
236
  table = client.query(
242
237
  query="SELECT * FROM flight WHERE time > now() - 4h",
243
238
  language="influxql")
@@ -57,13 +57,11 @@ from influxdb_client_3 import InfluxDBClient3, Point
57
57
 
58
58
  ## Initialization
59
59
  If you are using InfluxDB Cloud, then you should note that:
60
- 1. You will need to supply your org id, this is not necessary for InfluxDB Dedicated.
61
- 2. Use bucket name for the `database` argument.
60
+ 1. Use bucket name for the `database` argument.
62
61
 
63
62
  ```python
64
63
  client = InfluxDBClient3(token="your-token",
65
64
  host="your-host",
66
- org="your-org",
67
65
  database="your-database")
68
66
  ```
69
67
 
@@ -124,7 +122,6 @@ wco = write_client_options(success_callback=callback.success,
124
122
  with InfluxDBClient3.InfluxDBClient3(
125
123
  token="INSERT_TOKEN",
126
124
  host="eu-central-1-1.aws.cloud2.influxdata.com",
127
- org="6a841c0c08328fb1",
128
125
  database="python", write_client_options=wco) as client:
129
126
 
130
127
 
@@ -171,27 +168,24 @@ Install `certifi`
171
168
  pip install certifi
172
169
  ```
173
170
  Next include certifi within the flight client options:
171
+
174
172
  ```python
173
+ import certifi
174
+
175
175
  import influxdb_client_3 as InfluxDBClient3
176
- import pandas as pd
177
- import numpy as np
178
176
  from influxdb_client_3 import flight_client_options
179
- import certifi
180
177
 
181
178
  fh = open(certifi.where(), "r")
182
179
  cert = fh.read()
183
180
  fh.close()
184
181
 
185
-
186
182
  client = InfluxDBClient3.InfluxDBClient3(
187
183
  token="",
188
184
  host="b0c7cce5-8dbc-428e-98c6-7f996fb96467.a.influxdb.io",
189
- org="6a841c0c08328fb1",
190
185
  database="flightdemo",
191
186
  flight_client_options=flight_client_options(
192
187
  tls_root_certs=cert))
193
188
 
194
-
195
189
  table = client.query(
196
190
  query="SELECT * FROM flight WHERE time > now() - 4h",
197
191
  language="influxql")
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: influxdb3-python
3
- Version: 0.11.0
3
+ Version: 0.13.0
4
4
  Summary: Community Python client for InfluxDB 3.0
5
5
  Home-page: https://github.com/InfluxCommunity/influxdb3-python
6
6
  Author: InfluxData
@@ -39,6 +39,7 @@ Dynamic: classifier
39
39
  Dynamic: description
40
40
  Dynamic: description-content-type
41
41
  Dynamic: home-page
42
+ Dynamic: license-file
42
43
  Dynamic: provides-extra
43
44
  Dynamic: requires-dist
44
45
  Dynamic: requires-python
@@ -103,13 +104,11 @@ from influxdb_client_3 import InfluxDBClient3, Point
103
104
 
104
105
  ## Initialization
105
106
  If you are using InfluxDB Cloud, then you should note that:
106
- 1. You will need to supply your org id, this is not necessary for InfluxDB Dedicated.
107
- 2. Use bucket name for the `database` argument.
107
+ 1. Use bucket name for the `database` argument.
108
108
 
109
109
  ```python
110
110
  client = InfluxDBClient3(token="your-token",
111
111
  host="your-host",
112
- org="your-org",
113
112
  database="your-database")
114
113
  ```
115
114
 
@@ -170,7 +169,6 @@ wco = write_client_options(success_callback=callback.success,
170
169
  with InfluxDBClient3.InfluxDBClient3(
171
170
  token="INSERT_TOKEN",
172
171
  host="eu-central-1-1.aws.cloud2.influxdata.com",
173
- org="6a841c0c08328fb1",
174
172
  database="python", write_client_options=wco) as client:
175
173
 
176
174
 
@@ -217,27 +215,24 @@ Install `certifi`
217
215
  pip install certifi
218
216
  ```
219
217
  Next include certifi within the flight client options:
218
+
220
219
  ```python
220
+ import certifi
221
+
221
222
  import influxdb_client_3 as InfluxDBClient3
222
- import pandas as pd
223
- import numpy as np
224
223
  from influxdb_client_3 import flight_client_options
225
- import certifi
226
224
 
227
225
  fh = open(certifi.where(), "r")
228
226
  cert = fh.read()
229
227
  fh.close()
230
228
 
231
-
232
229
  client = InfluxDBClient3.InfluxDBClient3(
233
230
  token="",
234
231
  host="b0c7cce5-8dbc-428e-98c6-7f996fb96467.a.influxdb.io",
235
- org="6a841c0c08328fb1",
236
232
  database="flightdemo",
237
233
  flight_client_options=flight_client_options(
238
234
  tls_root_certs=cert))
239
235
 
240
-
241
236
  table = client.query(
242
237
  query="SELECT * FROM flight WHERE time > now() - 4h",
243
238
  language="influxql")
@@ -2,6 +2,7 @@ LICENSE
2
2
  README.md
3
3
  setup.py
4
4
  Examples/__init__.py
5
+ Examples/basic_ssl_example.py
5
6
  Examples/batching_example.py
6
7
  Examples/cloud_dedicated_query.py
7
8
  Examples/cloud_dedicated_write.py
@@ -9,6 +10,7 @@ Examples/config.py
9
10
  Examples/flight_options_example.py
10
11
  Examples/handle_http_error.py
11
12
  Examples/pandas_write.py
13
+ Examples/query_async.py
12
14
  Examples/query_type.py
13
15
  influxdb3_python.egg-info/PKG-INFO
14
16
  influxdb3_python.egg-info/SOURCES.txt