Skip to content

Commit c0b0205

Browse files
authored
Merge branch 'main' into oclyke/docs-typo
2 parents 5ffa7a9 + 4c37af0 commit c0b0205

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1882
-501
lines changed

.circleci/config.yml

Lines changed: 93 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
version: 2.1
22

3+
parameters:
4+
default-python-image:
5+
type: string
6+
default: "cimg/python:3.8"
7+
8+
executors:
9+
docker-amd64-image:
10+
parameters:
11+
python-image:
12+
type: string
13+
default: << pipeline.parameters.default-python-image >>
14+
docker:
15+
- image: <<parameters.python-image>>
16+
- image: influxdb:3-core
17+
environment:
18+
- INFLUXDB3_NODE_IDENTIFIER_PREFIX=node01
19+
- INFLUXDB3_OBJECT_STORE=file
20+
- INFLUXDB3_DB_DIR=/var/lib/influxdb3/data
21+
docker-arm64-image:
22+
parameters:
23+
python-image:
24+
type: string
25+
default: << pipeline.parameters.default-python-image >>
26+
docker:
27+
- image: <<parameters.python-image>>
28+
- image: influxdb:3-core
29+
environment:
30+
- INFLUXDB3_NODE_IDENTIFIER_PREFIX=node01
31+
- INFLUXDB3_OBJECT_STORE=file
32+
- INFLUXDB3_DB_DIR=/var/lib/influxdb3/data
33+
resource_class: arm.medium
34+
335
commands:
436
client-test:
537
description: "Run tests"
@@ -31,40 +63,74 @@ commands:
3163
- "~/.cache/pip"
3264
- "/usr/local/lib/site-python"
3365
when: always
66+
upload-codecov-amd64:
67+
steps:
68+
- run:
69+
name: Collecting coverage reports
70+
command: |
71+
curl -Os https://uploader.codecov.io/latest/linux/codecov
72+
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
73+
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
74+
curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
75+
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
76+
shasum -a 256 -c codecov.SHA256SUM
77+
chmod +x ./codecov
78+
./codecov
79+
upload-codecov-arm64:
80+
steps:
81+
- run:
82+
name: Collecting coverage reports
83+
command: |
84+
curl -k https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
85+
curl -Os https://uploader.codecov.io/v0.8.0/aarch64/codecov
86+
curl -Os https://uploader.codecov.io/v0.8.0/aarch64/codecov.SHA256SUM
87+
curl -Os https://uploader.codecov.io/v0.8.0/aarch64/codecov.SHA256SUM.sig
88+
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
89+
shasum -a 256 -c codecov.SHA256SUM
90+
sudo chmod +x codecov
91+
3492
jobs:
3593
tests-python:
3694
parameters:
3795
python-image:
3896
type: string
39-
default: &default-python "cimg/python:3.8"
97+
default: <<pipeline.parameters.default-python-image>>>>
98+
exe:
99+
type: string
100+
default: docker-amd64-image
40101
pytest-marker:
41102
type: string
42103
default: "not integration"
43-
docker:
44-
- image: << parameters.python-image >>
45-
environment:
46-
PIPENV_VENV_IN_PROJECT: true
104+
executor:
105+
name: << parameters.exe >>
106+
python-image: << parameters.python-image >>
47107
steps:
48108
- checkout
109+
- run:
110+
name: Setup InfluxDB service
111+
command: |
112+
./scripts/influxdb-setup.sh \
113+
--export-url-as TESTING_INFLUXDB_URL \
114+
--export-db-as TESTING_INFLUXDB_DATABASE \
115+
--export-token-as TESTING_INFLUXDB_TOKEN
49116
- client-test:
50117
python-image: << parameters.python-image >>
51118
pytest-marker: << parameters.pytest-marker >>
52119
- store_test_results:
53120
path: test-reports
54-
- run:
55-
name: Collecting coverage reports
56-
command: |
57-
curl -Os https://uploader.codecov.io/latest/linux/codecov
58-
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
59-
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
60-
curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
61-
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
62-
shasum -a 256 -c codecov.SHA256SUM
63-
chmod +x ./codecov
64-
./codecov
121+
- when:
122+
condition:
123+
equal: [ docker-amd64-image, << parameters.exe >> ]
124+
steps:
125+
- upload-codecov-amd64
126+
- when:
127+
condition:
128+
equal: [ docker-arm64-image, << parameters.exe >> ]
129+
steps:
130+
- upload-codecov-arm64
65131
check-code-style:
66132
docker:
67-
- image: *default-python
133+
- image: <<pipeline.parameters.default-python-image>>
68134
environment:
69135
PIPENV_VENV_IN_PROJECT: true
70136
steps:
@@ -91,7 +157,7 @@ jobs:
91157
flake8 Examples/
92158
check-twine:
93159
docker:
94-
- image: *default-python
160+
- image: <<pipeline.parameters.default-python-image>>
95161
environment:
96162
PIPENV_VENV_IN_PROJECT: true
97163
steps:
@@ -105,7 +171,7 @@ jobs:
105171
twine check dist/*
106172
check-docstyle:
107173
docker:
108-
- image: *default-python
174+
- image: <<pipeline.parameters.default-python-image>>
109175
environment:
110176
PIPENV_VENV_IN_PROJECT: true
111177
steps:
@@ -116,6 +182,7 @@ jobs:
116182
pip install pydocstyle --user
117183
pydocstyle --count influxdb_client_3
118184
185+
119186
workflows:
120187
version: 2
121188
build:
@@ -124,36 +191,18 @@ workflows:
124191
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
125192
jobs:
126193
- check-code-style
127-
# - check-docstyle
194+
# - check-docstyle
128195
- check-twine
129196
- tests-python:
130-
name: test-3.8
131-
python-image: "cimg/python:3.8"
132-
- tests-python:
133-
name: test-3.9
134-
python-image: "cimg/python:3.9"
135-
- tests-python:
136-
name: test-3.10
137-
python-image: "cimg/python:3.10"
138-
- tests-python:
139-
name: test-3.11
140-
python-image: "cimg/python:3.11"
141-
- tests-python:
142-
name: test-3.12
143-
python-image: "cimg/python:3.12"
144-
- tests-python:
145-
name: test-3.13
146-
python-image: "cimg/python:3.13"
197+
matrix:
198+
parameters:
199+
exe: [ docker-amd64-image, docker-arm64-image ]
200+
python-image: [ << pipeline.parameters.default-python-image >>, "cimg/python:3.9", "cimg/python:3.10", "cimg/python:3.11", "cimg/python:3.12", cimg/python:3.13 ]
147201
- tests-python:
148202
requires:
149-
- test-3.8
150-
- test-3.9
151-
- test-3.10
152-
- test-3.11
153-
- test-3.12
154-
- test-3.13
203+
- tests-python
155204
name: test-integration
156-
python-image: *default-python
205+
python-image: <<pipeline.parameters.default-python-image>>
157206
pytest-marker: "integration"
158207

159208
nightly:

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.10"
7+
8+
mkdocs:
9+
configuration: docs/mkdocs.yml
10+
11+
python:
12+
install:
13+
- requirements: docs/requirements.txt

CHANGELOG.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,57 @@
11
# Change Log
22

3-
## 0.13.0 [unreleased]
3+
# 0.17.0 [unreleased]
44

5+
### CI
6+
7+
1. [#164](https://github.com/InfluxCommunity/influxdb3-python/pull/164): Fix pipelines not downloading the correct python images.
8+
9+
## 0.16.0 [2025-09-15]
10+
11+
### Features
12+
13+
1. [#158](https://github.com/InfluxCommunity/influxdb3-python/pull/158) Improved parameters for setting timeouts
14+
- `InfluxDB3Client()` constructor now directly specifies
15+
- `write_timeout` - timeout in milliseconds to be used when writing data.
16+
- `query_timeout` - timeout in milliseconds to be used when querying data.
17+
- Timeouts can be specifically overridden in direct method calls.
18+
- `client.write()` now propagates the argument `_request_timeout` as an `int` in milliseconds on the call stack
19+
even in batching mode.
20+
- `client.query()` now propagates the argument `timeout` as a `float` in seconds on the call stack.
21+
22+
### CI
23+
24+
1. [#153](https://github.com/InfluxCommunity/influxdb3-python/pull/153) Add tests for arm64 CircleCI.
25+
26+
## 0.15.0 [2025-08-12]
27+
28+
### Features
29+
30+
1. [#146](https://github.com/InfluxCommunity/influxdb3-python/pull/146): Add function to get InfluxDB version.
31+
2. [#149](https://github.com/InfluxCommunity/influxdb3-python/pull/149): Run integration tests against a locally started InfluxDB 3 Core server.
32+
33+
## 0.14.0 [2025-06-18]
34+
35+
### Features
36+
37+
1. [#141](https://github.com/InfluxCommunity/influxdb3-python/pull/141) Move "setuptools" package to build dependency.
38+
2. [#142](https://github.com/InfluxCommunity/influxdb3-python/pull/142): Support fast writes without waiting for WAL
39+
persistence:
40+
- New write option (`WriteOptions.no_sync`) added: `True` value means faster write but without the confirmation that
41+
the data was persisted. Default value: `False`.
42+
- **Supported by self-managed InfluxDB 3 Core and Enterprise servers only!**
43+
- Also configurable via environment variable (`INFLUX_WRITE_NO_SYNC`).
44+
- Long precision string values added from v3 HTTP API: `"nanosecond"`, `"microsecond"`, `"millisecond"`,
45+
`"second"` ( in addition to the existing `"ns"`, `"us"`, `"ms"`, `"s"`).
46+
3. [#145](https://github.com/InfluxCommunity/influxdb3-python/pull/145): Improve the document wording for README.md
47+
48+
## 0.13.0 [2025-05-20]
49+
50+
### Features
51+
52+
1. [#130](https://github.com/InfluxCommunity/influxdb3-python/pull/130): Remove org parameters from the example code because It is not mandatory in Influxdb3
53+
2. [#139](https://github.com/InfluxCommunity/influxdb3-python/pull/139): Supports environment variables with the same name as other clients
54+
3. [#140](https://github.com/InfluxCommunity/influxdb3-python/pull/140): Query api will throw `InfluxdbClientQueryError` when receiving `ArrowException` from gRPC servers
555

656
## 0.12.0 [2025-03-26]
757

Examples/basic_ssl_example.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def write_and_query_with_explicit_sys_cert(conf):
7070
print("\nwrite and query with typical linux system cert\n")
7171
with InfluxDBClient3(token=conf.token,
7272
host=conf.host,
73-
org=conf.org,
7473
database=conf.database,
7574
ssl_ca_cert="/etc/ssl/certs/ca-certificates.crt",
7675
verify_ssl=True) as _client:
@@ -90,7 +89,6 @@ def query_with_verify_ssl_off(conf, cert):
9089
# Switch verify_ssl to True to throw SSL_ERROR_SSL
9190
with InfluxDBClient3(token=conf.token,
9291
host=conf.host,
93-
org=conf.org,
9492
database=conf.database,
9593
ssl_ca_cert=cert,
9694
verify_ssl=False) as _client:

Examples/batching_example.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def main() -> None:
7070
# of 10k ms and gzip compression
7171
with InfluxDBClient3.InfluxDBClient3(token=conf.token,
7272
host=conf.host,
73-
org=conf.org,
7473
database=conf.database,
7574
enable_gzip=True,
7675
write_client_options=wco) as _client:

Examples/cloud_dedicated_query.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
client = InfluxDBClient3.InfluxDBClient3(
77
token=config.token,
88
host=config.host,
9-
org=config.org,
109
database=config.database)
1110

1211
table = client.query(

Examples/cloud_dedicated_write.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
client = InfluxDBClient3.InfluxDBClient3(
1010
token=config.token,
1111
host=config.host,
12-
org=config.org,
1312
database=config.database,
1413
write_options=WriteOptions(
1514
batch_size=500,

Examples/community/custom_url.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def retry(self, conf, data: str, exception: InfluxDBError):
3636
client = InfluxDBClient3(
3737
token="",
3838
host="https://eu-central-1-1.aws.cloud2.influxdata.com:442",
39-
org="6a841c0c08328fb1",
4039
database="pokemon-codex", enable_gzip=True, write_client_options=wco, write_port_overwrite=443,
4140
query_port_overwrite=443)
4241

Examples/community/database_transfer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ def retry(self, conf, data: str, exception: InfluxDBError):
1818

1919
# InfluxDB connection details
2020
token = ""
21-
org = "6a841c0c08328fb1"
2221
dbfrom = "a"
2322
dbto = "b"
2423
url = "eu-central-1-1.aws.cloud2.influxdata.com"
@@ -44,7 +43,6 @@ def retry(self, conf, data: str, exception: InfluxDBError):
4443
# of 10k ms and gzip compression
4544
with InfluxDBClient3.InfluxDBClient3(token=token,
4645
host=url,
47-
org=org,
4846
enable_gzip=True, write_client_options=wco) as _client:
4947
query = f"SHOW TAG KEYS FROM {measurement}"
5048
tags = _client.query(query=query, language="influxql", database=dbfrom)

Examples/config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ class Config:
66
def __init__(self):
77
self.host = os.getenv('INFLUXDB_HOST') or 'https://us-east-1-1.aws.cloud2.influxdata.com/'
88
self.token = os.getenv('INFLUXDB_TOKEN') or 'my-token'
9-
self.org = os.getenv('INFLUXDB_ORG') or 'my-org'
109
self.database = os.getenv('INFLUXDB_DATABASE') or 'my-db'
1110

1211
def __str__(self):

0 commit comments

Comments
 (0)