Skip to content

Commit 93129b0

Browse files
feat: remove org from examples code
1 parent 70f42dd commit 93129b0

30 files changed

+13
-45
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## 0.13.0 [unreleased]
44

5+
### Features
6+
7+
1. [#130](https://github.com/InfluxCommunity/influxdb3-python/pull/130): Remove org parameters from the example code because It is not mandatory in Influxdb3
58

69
## 0.12.0 [2025-03-26]
710

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):

Examples/file-import/csv_write.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,13 @@ def main() -> None:
4343
"""
4444
token: access token generated in cloud
4545
host: ATTN could be another AWS region or even another cloud provider
46-
org: organization associated with account and database
4746
database: should have retention policy 'forever' to handle older sample data timestamps
4847
write_client_options: see above
4948
debug: allows low-level inspection of communications and context-manager termination
5049
"""
5150
with InfluxDBClient3.InfluxDBClient3(
5251
token="INSERT_TOKEN",
5352
host="https://us-east-1-1.aws.cloud2.influxdata.com/",
54-
org="INSERT_ORG",
5553
database="example_data_forever",
5654
write_client_options=wco,
5755
debug=True) as client:

Examples/file-import/feather_write.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def retry(self, conf, data: str, exception: InfluxDBError):
3333
with InfluxDBClient3.InfluxDBClient3(
3434
token="INSERT_TOKEN",
3535
host="eu-central-1-1.aws.cloud2.influxdata.com",
36-
org="6a841c0c08328fb1",
3736
database="python", write_client_options=wco) as client:
3837
client.write_file(
3938
file='./out.feather',

0 commit comments

Comments
 (0)