diff --git a/.circleci/config.yml b/.circleci/config.yml
index 11104ba4..39c99633 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -46,7 +46,7 @@ jobs:
parameters:
python-image:
type: string
- default: "circleci/python:3.6-buster"
+ default: &default-python "circleci/python:3.6-buster"
influxdb-image:
type: string
default: "influxdb:2.0.0-beta"
@@ -69,24 +69,51 @@ jobs:
- run:
name: "Collecting coverage reports"
command: bash <(curl -s https://codecov.io/bash) -f ./coverage.xml || echo "Codecov did not collect coverage reports"
+ check-code-style:
+ docker:
+ - image: *default-python
+ environment:
+ PIPENV_VENV_IN_PROJECT: true
+ steps:
+ - checkout
+ - run:
+ name: Checks style consistency across sources.
+ command: |
+ pip install flake8 --user
+ flake8 influxdb_client/
+ check-twine:
+ docker:
+ - image: *default-python
+ environment:
+ PIPENV_VENV_IN_PROJECT: true
+ steps:
+ - checkout
+ - run:
+ name: Checks that the description will render correctly on PyPI.
+ command: |
+ pip install twine --user
+ python setup.py sdist bdist_wheel
+ twine check dist/*
workflows:
version: 2
build:
jobs:
+ - check-code-style
+ - check-twine
- tests-python:
- name: python-3.6
+ name: test-3.6
- tests-python:
- name: python-3.6-without-ciso8601
+ name: test-3.6-without-ciso8601
enabled-ciso-8601: false
- tests-python:
- name: python-3.6-nightly
+ name: test-3.6-influxdb-nightly
influxdb-image: "influx:nightly"
- tests-python:
- name: python-3.7
+ name: test-3.7
python-image: "circleci/python:3.7-buster"
- tests-python:
- name: python-3.8
+ name: test-3.8
python-image: "circleci/python:3.8-buster"
nightly:
diff --git a/influxdb_client/client/abstract_client.py b/influxdb_client/client/abstract_client.py
deleted file mode 100644
index 915e9146..00000000
--- a/influxdb_client/client/abstract_client.py
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-class AbstractClient:
- pass
\ No newline at end of file
diff --git a/influxdb_client/client/influxdb_client.py b/influxdb_client/client/influxdb_client.py
index a78c1308..2c6fff92 100644
--- a/influxdb_client/client/influxdb_client.py
+++ b/influxdb_client/client/influxdb_client.py
@@ -96,7 +96,8 @@ def from_env_properties(cls, debug=None, enable_gzip=False):
if key.startswith("INFLUXDB_V2_TAG_"):
default_tags[key[16:].lower()] = value
- return cls(url, token, debug=debug, timeout=int(timeout), org=org, default_tags=default_tags, enable_gzip=enable_gzip)
+ return cls(url, token, debug=debug, timeout=int(timeout), org=org, default_tags=default_tags,
+ enable_gzip=enable_gzip)
def write_api(self, write_options=WriteOptions(), point_settings=PointSettings()) -> WriteApi:
"""
diff --git a/influxdb_client/client/write_api.py b/influxdb_client/client/write_api.py
index 4db44639..cf71fa97 100644
--- a/influxdb_client/client/write_api.py
+++ b/influxdb_client/client/write_api.py
@@ -14,7 +14,6 @@
from rx.subject import Subject
from influxdb_client import WritePrecision, WriteService
-from influxdb_client.client.abstract_client import AbstractClient
from influxdb_client.client.write.point import Point, DEFAULT_WRITE_PRECISION, _ESCAPE_KEY
from influxdb_client.rest import ApiException
@@ -119,7 +118,7 @@ def __hash__(self) -> int:
def __eq__(self, o: object) -> bool:
return isinstance(o, self.__class__) \
- and self.bucket == o.bucket and self.org == o.org and self.precision == o.precision
+ and self.bucket == o.bucket and self.org == o.org and self.precision == o.precision
def __str__(self) -> str:
return '_BatchItemKey[bucket:\'{}\', org:\'{}\', precision:\'{}\']' \
@@ -141,7 +140,7 @@ def _body_reduce(batch_items):
return b'\n'.join(map(lambda batch_item: batch_item.data, batch_items))
-class WriteApi(AbstractClient):
+class WriteApi:
def __init__(self, influxdb_client, write_options: WriteOptions = WriteOptions(),
point_settings: PointSettings = PointSettings()) -> None:
@@ -188,9 +187,12 @@ def write(self, bucket: str, org: str = None,
"""
Writes time-series data into influxdb.
- :param str org: specifies the destination organization for writes; take either the ID or Name interchangeably; if both orgID and org are specified, org takes precedence. (required)
+ :param str org: specifies the destination organization for writes; take either the ID or Name interchangeably;
+ if both orgID and org are specified, org takes precedence. (required)
:param str bucket: specifies the destination bucket for writes (required)
- :param WritePrecision write_precision: specifies the precision for the unix timestamps within the body line-protocol. The precision specified on a Point has precedes and is use for write.
+ :param WritePrecision write_precision: specifies the precision for the unix timestamps within
+ the body line-protocol. The precision specified on a Point has precedes
+ and is use for write.
:param record: Points, line protocol, Pandas DataFrame, RxPY Observable to write
:param data_frame_measurement_name: name of measurement for writing Pandas DataFrame
:param data_frame_tag_columns: list of DataFrame columns which are tags, rest columns will be fields
@@ -253,7 +255,8 @@ def _serialize(self, record, write_precision, payload, **kwargs):
self._serialize(record.to_line_protocol(), record.write_precision, payload, **kwargs)
elif isinstance(record, dict):
- self._serialize(Point.from_dict(record, write_precision=write_precision), write_precision, payload, **kwargs)
+ self._serialize(Point.from_dict(record, write_precision=write_precision),
+ write_precision, payload, **kwargs)
elif 'DataFrame' in type(record).__name__:
_data = self._data_frame_to_list_of_points(record, precision=write_precision, **kwargs)
self._serialize(_data, write_precision, payload, **kwargs)
diff --git a/influxdb_client/domain/authorization.py b/influxdb_client/domain/authorization.py
index de30414f..5e75e7b2 100644
--- a/influxdb_client/domain/authorization.py
+++ b/influxdb_client/domain/authorization.py
@@ -63,7 +63,7 @@ class Authorization(AuthorizationUpdateRequest):
def __init__(self, created_at=None, updated_at=None, org_id=None, permissions=None, id=None, token=None, user_id=None, user=None, org=None, links=None, status='active', description=None): # noqa: E501
"""Authorization - a model defined in OpenAPI""" # noqa: E501
- AuthorizationUpdateRequest.__init__(self, status=status, description=description)
+ AuthorizationUpdateRequest.__init__(self, status=status, description=description) # noqa: E501
self._created_at = None
self._updated_at = None
diff --git a/influxdb_client/domain/check.py b/influxdb_client/domain/check.py
index e226d7a1..97d060cf 100644
--- a/influxdb_client/domain/check.py
+++ b/influxdb_client/domain/check.py
@@ -69,7 +69,7 @@ class Check(CheckBase):
def __init__(self, id=None, name=None, org_id=None, owner_id=None, created_at=None, updated_at=None, query=None, status=None, every=None, offset=None, tags=None, description=None, status_message_template=None, labels=None, links=None): # noqa: E501
"""Check - a model defined in OpenAPI""" # noqa: E501
- CheckBase.__init__(self, id=id, name=name, org_id=org_id, owner_id=owner_id, created_at=created_at, updated_at=updated_at, query=query, status=status, every=every, offset=offset, tags=tags, description=description, status_message_template=status_message_template, labels=labels, links=links)
+ CheckBase.__init__(self, id=id, name=name, org_id=org_id, owner_id=owner_id, created_at=created_at, updated_at=updated_at, query=query, status=status, every=every, offset=offset, tags=tags, description=description, status_message_template=status_message_template, labels=labels, links=links) # noqa: E501
self.discriminator = None
def to_dict(self):
diff --git a/influxdb_client/domain/check_base.py b/influxdb_client/domain/check_base.py
index 031f90e5..bd003c5f 100644
--- a/influxdb_client/domain/check_base.py
+++ b/influxdb_client/domain/check_base.py
@@ -69,7 +69,7 @@ class CheckBase(CheckDiscriminator):
def __init__(self, id=None, name=None, org_id=None, owner_id=None, created_at=None, updated_at=None, query=None, status=None, every=None, offset=None, tags=None, description=None, status_message_template=None, labels=None, links=None): # noqa: E501
"""CheckBase - a model defined in OpenAPI""" # noqa: E501
- CheckDiscriminator.__init__(self)
+ CheckDiscriminator.__init__(self) # noqa: E501
self._id = None
self._name = None
diff --git a/influxdb_client/domain/check_discriminator.py b/influxdb_client/domain/check_discriminator.py
index 6cc006e1..34c21ae4 100644
--- a/influxdb_client/domain/check_discriminator.py
+++ b/influxdb_client/domain/check_discriminator.py
@@ -46,7 +46,7 @@ class CheckDiscriminator(PostCheck):
def __init__(self): # noqa: E501
"""CheckDiscriminator - a model defined in OpenAPI""" # noqa: E501
- PostCheck.__init__(self)
+ PostCheck.__init__(self) # noqa: E501
self.discriminator = 'type'
def get_real_child_model(self, data):
diff --git a/influxdb_client/domain/check_view_properties.py b/influxdb_client/domain/check_view_properties.py
index 1519ae0e..ab2985b9 100644
--- a/influxdb_client/domain/check_view_properties.py
+++ b/influxdb_client/domain/check_view_properties.py
@@ -51,7 +51,7 @@ class CheckViewProperties(ViewProperties):
def __init__(self, type=None, shape=None, check_id=None, check=None, queries=None, colors=None): # noqa: E501
"""CheckViewProperties - a model defined in OpenAPI""" # noqa: E501
- ViewProperties.__init__(self)
+ ViewProperties.__init__(self) # noqa: E501
self._type = None
self._shape = None
diff --git a/influxdb_client/domain/dashboard.py b/influxdb_client/domain/dashboard.py
index 035ed385..a2952107 100644
--- a/influxdb_client/domain/dashboard.py
+++ b/influxdb_client/domain/dashboard.py
@@ -55,7 +55,7 @@ class Dashboard(CreateDashboardRequest):
def __init__(self, links=None, id=None, meta=None, cells=None, labels=None, org_id=None, name=None, description=None): # noqa: E501
"""Dashboard - a model defined in OpenAPI""" # noqa: E501
- CreateDashboardRequest.__init__(self, org_id=org_id, name=name, description=description)
+ CreateDashboardRequest.__init__(self, org_id=org_id, name=name, description=description) # noqa: E501
self._links = None
self._id = None
diff --git a/influxdb_client/domain/deadman_check.py b/influxdb_client/domain/deadman_check.py
index 9ad3c904..55a84da9 100644
--- a/influxdb_client/domain/deadman_check.py
+++ b/influxdb_client/domain/deadman_check.py
@@ -49,7 +49,7 @@ class DeadmanCheck(Check):
def __init__(self, type=None, time_since=None, stale_time=None, report_zero=None, level=None): # noqa: E501
"""DeadmanCheck - a model defined in OpenAPI""" # noqa: E501
- Check.__init__(self)
+ Check.__init__(self) # noqa: E501
self._type = None
self._time_since = None
diff --git a/influxdb_client/domain/gauge_view_properties.py b/influxdb_client/domain/gauge_view_properties.py
index d7bff055..055ed689 100644
--- a/influxdb_client/domain/gauge_view_properties.py
+++ b/influxdb_client/domain/gauge_view_properties.py
@@ -63,7 +63,7 @@ class GaugeViewProperties(ViewProperties):
def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, prefix=None, tick_prefix=None, suffix=None, tick_suffix=None, legend=None, decimal_places=None): # noqa: E501
"""GaugeViewProperties - a model defined in OpenAPI""" # noqa: E501
- ViewProperties.__init__(self)
+ ViewProperties.__init__(self) # noqa: E501
self._type = None
self._queries = None
diff --git a/influxdb_client/domain/greater_threshold.py b/influxdb_client/domain/greater_threshold.py
index 286a17ff..d5551506 100644
--- a/influxdb_client/domain/greater_threshold.py
+++ b/influxdb_client/domain/greater_threshold.py
@@ -14,10 +14,10 @@
import re # noqa: F401
import six
-from influxdb_client.domain.threshold_base import ThresholdBase
+from influxdb_client.domain.threshold import Threshold
-class GreaterThreshold(ThresholdBase):
+class GreaterThreshold(Threshold):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,21 +33,17 @@ class GreaterThreshold(ThresholdBase):
"""
openapi_types = {
'type': 'str',
- 'value': 'float',
- 'level': 'CheckStatusLevel',
- 'all_values': 'bool'
+ 'value': 'float'
}
attribute_map = {
'type': 'type',
- 'value': 'value',
- 'level': 'level',
- 'all_values': 'allValues'
+ 'value': 'value'
}
- def __init__(self, type=None, value=None, level=None, all_values=None): # noqa: E501
+ def __init__(self, type=None, value=None): # noqa: E501
"""GreaterThreshold - a model defined in OpenAPI""" # noqa: E501
- ThresholdBase.__init__(self, level=level, all_values=all_values)
+ Threshold.__init__(self) # noqa: E501
self._type = None
self._value = None
diff --git a/influxdb_client/domain/heatmap_view_properties.py b/influxdb_client/domain/heatmap_view_properties.py
index fc6f5b88..8d148612 100644
--- a/influxdb_client/domain/heatmap_view_properties.py
+++ b/influxdb_client/domain/heatmap_view_properties.py
@@ -75,7 +75,7 @@ class HeatmapViewProperties(ViewProperties):
def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, y_column=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None, bin_size=None): # noqa: E501
"""HeatmapViewProperties - a model defined in OpenAPI""" # noqa: E501
- ViewProperties.__init__(self)
+ ViewProperties.__init__(self) # noqa: E501
self._time_format = None
self._type = None
diff --git a/influxdb_client/domain/histogram_view_properties.py b/influxdb_client/domain/histogram_view_properties.py
index f304726c..cf972529 100644
--- a/influxdb_client/domain/histogram_view_properties.py
+++ b/influxdb_client/domain/histogram_view_properties.py
@@ -63,7 +63,7 @@ class HistogramViewProperties(ViewProperties):
def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, fill_columns=None, x_domain=None, x_axis_label=None, position=None, bin_count=None): # noqa: E501
"""HistogramViewProperties - a model defined in OpenAPI""" # noqa: E501
- ViewProperties.__init__(self)
+ ViewProperties.__init__(self) # noqa: E501
self._type = None
self._queries = None
diff --git a/influxdb_client/domain/http_notification_endpoint.py b/influxdb_client/domain/http_notification_endpoint.py
index bfd41f6d..975dbf98 100644
--- a/influxdb_client/domain/http_notification_endpoint.py
+++ b/influxdb_client/domain/http_notification_endpoint.py
@@ -55,7 +55,7 @@ class HTTPNotificationEndpoint(NotificationEndpoint):
def __init__(self, url=None, username=None, password=None, token=None, method=None, auth_method=None, content_template=None, headers=None): # noqa: E501
"""HTTPNotificationEndpoint - a model defined in OpenAPI""" # noqa: E501
- NotificationEndpoint.__init__(self)
+ NotificationEndpoint.__init__(self) # noqa: E501
self._url = None
self._username = None
diff --git a/influxdb_client/domain/http_notification_rule.py b/influxdb_client/domain/http_notification_rule.py
index 3fe00f4b..eea33ae4 100644
--- a/influxdb_client/domain/http_notification_rule.py
+++ b/influxdb_client/domain/http_notification_rule.py
@@ -43,7 +43,7 @@ class HTTPNotificationRule(HTTPNotificationRuleBase):
def __init__(self, type=None, url=None): # noqa: E501
"""HTTPNotificationRule - a model defined in OpenAPI""" # noqa: E501
- HTTPNotificationRuleBase.__init__(self, type=type, url=url)
+ HTTPNotificationRuleBase.__init__(self, type=type, url=url) # noqa: E501
self.discriminator = None
def to_dict(self):
diff --git a/influxdb_client/domain/lesser_threshold.py b/influxdb_client/domain/lesser_threshold.py
index 8f83ecdd..488cb498 100644
--- a/influxdb_client/domain/lesser_threshold.py
+++ b/influxdb_client/domain/lesser_threshold.py
@@ -14,10 +14,10 @@
import re # noqa: F401
import six
-from influxdb_client.domain.threshold_base import ThresholdBase
+from influxdb_client.domain.threshold import Threshold
-class LesserThreshold(ThresholdBase):
+class LesserThreshold(Threshold):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,21 +33,17 @@ class LesserThreshold(ThresholdBase):
"""
openapi_types = {
'type': 'str',
- 'value': 'float',
- 'level': 'CheckStatusLevel',
- 'all_values': 'bool'
+ 'value': 'float'
}
attribute_map = {
'type': 'type',
- 'value': 'value',
- 'level': 'level',
- 'all_values': 'allValues'
+ 'value': 'value'
}
- def __init__(self, type=None, value=None, level=None, all_values=None): # noqa: E501
+ def __init__(self, type=None, value=None): # noqa: E501
"""LesserThreshold - a model defined in OpenAPI""" # noqa: E501
- ThresholdBase.__init__(self, level=level, all_values=all_values)
+ Threshold.__init__(self) # noqa: E501
self._type = None
self._value = None
diff --git a/influxdb_client/domain/markdown_view_properties.py b/influxdb_client/domain/markdown_view_properties.py
index 02ae34ee..9e81343a 100644
--- a/influxdb_client/domain/markdown_view_properties.py
+++ b/influxdb_client/domain/markdown_view_properties.py
@@ -45,7 +45,7 @@ class MarkdownViewProperties(ViewProperties):
def __init__(self, type=None, shape=None, note=None): # noqa: E501
"""MarkdownViewProperties - a model defined in OpenAPI""" # noqa: E501
- ViewProperties.__init__(self)
+ ViewProperties.__init__(self) # noqa: E501
self._type = None
self._shape = None
diff --git a/influxdb_client/domain/notification_endpoint.py b/influxdb_client/domain/notification_endpoint.py
index 731415c3..eee869bd 100644
--- a/influxdb_client/domain/notification_endpoint.py
+++ b/influxdb_client/domain/notification_endpoint.py
@@ -61,7 +61,7 @@ class NotificationEndpoint(NotificationEndpointBase):
def __init__(self, id=None, org_id=None, user_id=None, created_at=None, updated_at=None, description=None, name=None, status='active', labels=None, links=None, type=None): # noqa: E501
"""NotificationEndpoint - a model defined in OpenAPI""" # noqa: E501
- NotificationEndpointBase.__init__(self, id=id, org_id=org_id, user_id=user_id, created_at=created_at, updated_at=updated_at, description=description, name=name, status=status, labels=labels, links=links, type=type)
+ NotificationEndpointBase.__init__(self, id=id, org_id=org_id, user_id=user_id, created_at=created_at, updated_at=updated_at, description=description, name=name, status=status, labels=labels, links=links, type=type) # noqa: E501
self.discriminator = None
def to_dict(self):
diff --git a/influxdb_client/domain/notification_endpoint_base.py b/influxdb_client/domain/notification_endpoint_base.py
index 8ddc46ff..19b6507d 100644
--- a/influxdb_client/domain/notification_endpoint_base.py
+++ b/influxdb_client/domain/notification_endpoint_base.py
@@ -61,7 +61,7 @@ class NotificationEndpointBase(NotificationEndpointDiscriminator):
def __init__(self, id=None, org_id=None, user_id=None, created_at=None, updated_at=None, description=None, name=None, status='active', labels=None, links=None, type=None): # noqa: E501
"""NotificationEndpointBase - a model defined in OpenAPI""" # noqa: E501
- NotificationEndpointDiscriminator.__init__(self)
+ NotificationEndpointDiscriminator.__init__(self) # noqa: E501
self._id = None
self._org_id = None
diff --git a/influxdb_client/domain/notification_endpoint_discriminator.py b/influxdb_client/domain/notification_endpoint_discriminator.py
index ea96914d..eb7df867 100644
--- a/influxdb_client/domain/notification_endpoint_discriminator.py
+++ b/influxdb_client/domain/notification_endpoint_discriminator.py
@@ -47,7 +47,7 @@ class NotificationEndpointDiscriminator(PostNotificationEndpoint):
def __init__(self): # noqa: E501
"""NotificationEndpointDiscriminator - a model defined in OpenAPI""" # noqa: E501
- PostNotificationEndpoint.__init__(self)
+ PostNotificationEndpoint.__init__(self) # noqa: E501
self.discriminator = 'type'
def get_real_child_model(self, data):
diff --git a/influxdb_client/domain/notification_rule.py b/influxdb_client/domain/notification_rule.py
index 0ecd2e14..b2068c4a 100644
--- a/influxdb_client/domain/notification_rule.py
+++ b/influxdb_client/domain/notification_rule.py
@@ -77,7 +77,7 @@ class NotificationRule(NotificationRuleBase):
def __init__(self, id=None, endpoint_id=None, org_id=None, owner_id=None, created_at=None, updated_at=None, status=None, name=None, sleep_until=None, every=None, offset=None, runbook_link=None, limit_every=None, limit=None, tag_rules=None, description=None, status_rules=None, labels=None, links=None): # noqa: E501
"""NotificationRule - a model defined in OpenAPI""" # noqa: E501
- NotificationRuleBase.__init__(self, id=id, endpoint_id=endpoint_id, org_id=org_id, owner_id=owner_id, created_at=created_at, updated_at=updated_at, status=status, name=name, sleep_until=sleep_until, every=every, offset=offset, runbook_link=runbook_link, limit_every=limit_every, limit=limit, tag_rules=tag_rules, description=description, status_rules=status_rules, labels=labels, links=links)
+ NotificationRuleBase.__init__(self, id=id, endpoint_id=endpoint_id, org_id=org_id, owner_id=owner_id, created_at=created_at, updated_at=updated_at, status=status, name=name, sleep_until=sleep_until, every=every, offset=offset, runbook_link=runbook_link, limit_every=limit_every, limit=limit, tag_rules=tag_rules, description=description, status_rules=status_rules, labels=labels, links=links) # noqa: E501
self.discriminator = None
def to_dict(self):
diff --git a/influxdb_client/domain/notification_rule_base.py b/influxdb_client/domain/notification_rule_base.py
index 5f69094a..093b94ba 100644
--- a/influxdb_client/domain/notification_rule_base.py
+++ b/influxdb_client/domain/notification_rule_base.py
@@ -77,7 +77,7 @@ class NotificationRuleBase(PostNotificationRule):
def __init__(self, id=None, endpoint_id=None, org_id=None, owner_id=None, created_at=None, updated_at=None, status=None, name=None, sleep_until=None, every=None, offset=None, runbook_link=None, limit_every=None, limit=None, tag_rules=None, description=None, status_rules=None, labels=None, links=None): # noqa: E501
"""NotificationRuleBase - a model defined in OpenAPI""" # noqa: E501
- PostNotificationRule.__init__(self)
+ PostNotificationRule.__init__(self) # noqa: E501
self._id = None
self._endpoint_id = None
diff --git a/influxdb_client/domain/pager_duty_notification_endpoint.py b/influxdb_client/domain/pager_duty_notification_endpoint.py
index 5d8583df..ee7c4f07 100644
--- a/influxdb_client/domain/pager_duty_notification_endpoint.py
+++ b/influxdb_client/domain/pager_duty_notification_endpoint.py
@@ -43,7 +43,7 @@ class PagerDutyNotificationEndpoint(NotificationEndpoint):
def __init__(self, client_url=None, routing_key=None): # noqa: E501
"""PagerDutyNotificationEndpoint - a model defined in OpenAPI""" # noqa: E501
- NotificationEndpoint.__init__(self)
+ NotificationEndpoint.__init__(self) # noqa: E501
self._client_url = None
self._routing_key = None
diff --git a/influxdb_client/domain/pager_duty_notification_rule.py b/influxdb_client/domain/pager_duty_notification_rule.py
index b63df9ee..bf947ef3 100644
--- a/influxdb_client/domain/pager_duty_notification_rule.py
+++ b/influxdb_client/domain/pager_duty_notification_rule.py
@@ -43,7 +43,7 @@ class PagerDutyNotificationRule(PagerDutyNotificationRuleBase):
def __init__(self, type=None, message_template=None): # noqa: E501
"""PagerDutyNotificationRule - a model defined in OpenAPI""" # noqa: E501
- PagerDutyNotificationRuleBase.__init__(self, type=type, message_template=message_template)
+ PagerDutyNotificationRuleBase.__init__(self, type=type, message_template=message_template) # noqa: E501
self.discriminator = None
def to_dict(self):
diff --git a/influxdb_client/domain/post_notification_rule.py b/influxdb_client/domain/post_notification_rule.py
index 73869478..9714d72f 100644
--- a/influxdb_client/domain/post_notification_rule.py
+++ b/influxdb_client/domain/post_notification_rule.py
@@ -39,7 +39,7 @@ class PostNotificationRule(NotificationRuleDiscriminator):
def __init__(self): # noqa: E501
"""PostNotificationRule - a model defined in OpenAPI""" # noqa: E501
- NotificationRuleDiscriminator.__init__(self)
+ NotificationRuleDiscriminator.__init__(self) # noqa: E501
self.discriminator = None
def to_dict(self):
diff --git a/influxdb_client/domain/range_threshold.py b/influxdb_client/domain/range_threshold.py
index 1deb4662..3cca1579 100644
--- a/influxdb_client/domain/range_threshold.py
+++ b/influxdb_client/domain/range_threshold.py
@@ -14,10 +14,10 @@
import re # noqa: F401
import six
-from influxdb_client.domain.threshold_base import ThresholdBase
+from influxdb_client.domain.threshold import Threshold
-class RangeThreshold(ThresholdBase):
+class RangeThreshold(Threshold):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -35,23 +35,19 @@ class RangeThreshold(ThresholdBase):
'type': 'str',
'min': 'float',
'max': 'float',
- 'within': 'bool',
- 'level': 'CheckStatusLevel',
- 'all_values': 'bool'
+ 'within': 'bool'
}
attribute_map = {
'type': 'type',
'min': 'min',
'max': 'max',
- 'within': 'within',
- 'level': 'level',
- 'all_values': 'allValues'
+ 'within': 'within'
}
- def __init__(self, type=None, min=None, max=None, within=None, level=None, all_values=None): # noqa: E501
+ def __init__(self, type=None, min=None, max=None, within=None): # noqa: E501
"""RangeThreshold - a model defined in OpenAPI""" # noqa: E501
- ThresholdBase.__init__(self, level=level, all_values=all_values)
+ Threshold.__init__(self) # noqa: E501
self._type = None
self._min = None
diff --git a/influxdb_client/domain/resource_member.py b/influxdb_client/domain/resource_member.py
index cd36113d..b5ab31d0 100644
--- a/influxdb_client/domain/resource_member.py
+++ b/influxdb_client/domain/resource_member.py
@@ -51,7 +51,7 @@ class ResourceMember(User):
def __init__(self, role='member', id=None, oauth_id=None, name=None, status='active', links=None): # noqa: E501
"""ResourceMember - a model defined in OpenAPI""" # noqa: E501
- User.__init__(self, id=id, oauth_id=oauth_id, name=name, status=status, links=links)
+ User.__init__(self, id=id, oauth_id=oauth_id, name=name, status=status, links=links) # noqa: E501
self._role = None
self.discriminator = None
diff --git a/influxdb_client/domain/resource_owner.py b/influxdb_client/domain/resource_owner.py
index 02a0fbd6..8c496ffb 100644
--- a/influxdb_client/domain/resource_owner.py
+++ b/influxdb_client/domain/resource_owner.py
@@ -51,7 +51,7 @@ class ResourceOwner(User):
def __init__(self, role='owner', id=None, oauth_id=None, name=None, status='active', links=None): # noqa: E501
"""ResourceOwner - a model defined in OpenAPI""" # noqa: E501
- User.__init__(self, id=id, oauth_id=oauth_id, name=name, status=status, links=links)
+ User.__init__(self, id=id, oauth_id=oauth_id, name=name, status=status, links=links) # noqa: E501
self._role = None
self.discriminator = None
diff --git a/influxdb_client/domain/scatter_view_properties.py b/influxdb_client/domain/scatter_view_properties.py
index 6eeee3ee..dd1ee2e8 100644
--- a/influxdb_client/domain/scatter_view_properties.py
+++ b/influxdb_client/domain/scatter_view_properties.py
@@ -77,7 +77,7 @@ class ScatterViewProperties(ViewProperties):
def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, y_column=None, fill_columns=None, symbol_columns=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None): # noqa: E501
"""ScatterViewProperties - a model defined in OpenAPI""" # noqa: E501
- ViewProperties.__init__(self)
+ ViewProperties.__init__(self) # noqa: E501
self._time_format = None
self._type = None
diff --git a/influxdb_client/domain/scraper_target_response.py b/influxdb_client/domain/scraper_target_response.py
index 1bcc1e38..2ae0c3da 100644
--- a/influxdb_client/domain/scraper_target_response.py
+++ b/influxdb_client/domain/scraper_target_response.py
@@ -57,7 +57,7 @@ class ScraperTargetResponse(ScraperTargetRequest):
def __init__(self, id=None, org=None, bucket=None, links=None, name=None, type=None, url=None, org_id=None, bucket_id=None): # noqa: E501
"""ScraperTargetResponse - a model defined in OpenAPI""" # noqa: E501
- ScraperTargetRequest.__init__(self, name=name, type=type, url=url, org_id=org_id, bucket_id=bucket_id)
+ ScraperTargetRequest.__init__(self, name=name, type=type, url=url, org_id=org_id, bucket_id=bucket_id) # noqa: E501
self._id = None
self._org = None
diff --git a/influxdb_client/domain/secret_keys_response.py b/influxdb_client/domain/secret_keys_response.py
index 6a138814..48d6ae35 100644
--- a/influxdb_client/domain/secret_keys_response.py
+++ b/influxdb_client/domain/secret_keys_response.py
@@ -43,7 +43,7 @@ class SecretKeysResponse(SecretKeys):
def __init__(self, links=None, secrets=None): # noqa: E501
"""SecretKeysResponse - a model defined in OpenAPI""" # noqa: E501
- SecretKeys.__init__(self, secrets=secrets)
+ SecretKeys.__init__(self, secrets=secrets) # noqa: E501
self._links = None
self.discriminator = None
diff --git a/influxdb_client/domain/single_stat_view_properties.py b/influxdb_client/domain/single_stat_view_properties.py
index de4f4cbb..139bb263 100644
--- a/influxdb_client/domain/single_stat_view_properties.py
+++ b/influxdb_client/domain/single_stat_view_properties.py
@@ -63,7 +63,7 @@ class SingleStatViewProperties(ViewProperties):
def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, prefix=None, tick_prefix=None, suffix=None, tick_suffix=None, legend=None, decimal_places=None): # noqa: E501
"""SingleStatViewProperties - a model defined in OpenAPI""" # noqa: E501
- ViewProperties.__init__(self)
+ ViewProperties.__init__(self) # noqa: E501
self._type = None
self._queries = None
diff --git a/influxdb_client/domain/slack_notification_endpoint.py b/influxdb_client/domain/slack_notification_endpoint.py
index 2fde6efd..11a1dee0 100644
--- a/influxdb_client/domain/slack_notification_endpoint.py
+++ b/influxdb_client/domain/slack_notification_endpoint.py
@@ -43,7 +43,7 @@ class SlackNotificationEndpoint(NotificationEndpoint):
def __init__(self, url=None, token=None): # noqa: E501
"""SlackNotificationEndpoint - a model defined in OpenAPI""" # noqa: E501
- NotificationEndpoint.__init__(self)
+ NotificationEndpoint.__init__(self) # noqa: E501
self._url = None
self._token = None
diff --git a/influxdb_client/domain/slack_notification_rule.py b/influxdb_client/domain/slack_notification_rule.py
index c22d7837..3d084aa0 100644
--- a/influxdb_client/domain/slack_notification_rule.py
+++ b/influxdb_client/domain/slack_notification_rule.py
@@ -45,7 +45,7 @@ class SlackNotificationRule(SlackNotificationRuleBase):
def __init__(self, type=None, channel=None, message_template=None): # noqa: E501
"""SlackNotificationRule - a model defined in OpenAPI""" # noqa: E501
- SlackNotificationRuleBase.__init__(self, type=type, channel=channel, message_template=message_template)
+ SlackNotificationRuleBase.__init__(self, type=type, channel=channel, message_template=message_template) # noqa: E501
self.discriminator = None
def to_dict(self):
diff --git a/influxdb_client/domain/smtp_notification_rule.py b/influxdb_client/domain/smtp_notification_rule.py
index ee6366d9..a0a04f61 100644
--- a/influxdb_client/domain/smtp_notification_rule.py
+++ b/influxdb_client/domain/smtp_notification_rule.py
@@ -47,7 +47,7 @@ class SMTPNotificationRule(SMTPNotificationRuleBase):
def __init__(self, type=None, subject_template=None, body_template=None, to=None): # noqa: E501
"""SMTPNotificationRule - a model defined in OpenAPI""" # noqa: E501
- SMTPNotificationRuleBase.__init__(self, type=type, subject_template=subject_template, body_template=body_template, to=to)
+ SMTPNotificationRuleBase.__init__(self, type=type, subject_template=subject_template, body_template=body_template, to=to) # noqa: E501
self.discriminator = None
def to_dict(self):
diff --git a/influxdb_client/domain/table_view_properties.py b/influxdb_client/domain/table_view_properties.py
index e47d7239..b2a3e8c8 100644
--- a/influxdb_client/domain/table_view_properties.py
+++ b/influxdb_client/domain/table_view_properties.py
@@ -59,7 +59,7 @@ class TableViewProperties(ViewProperties):
def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, table_options=None, field_options=None, time_format=None, decimal_places=None): # noqa: E501
"""TableViewProperties - a model defined in OpenAPI""" # noqa: E501
- ViewProperties.__init__(self)
+ ViewProperties.__init__(self) # noqa: E501
self._type = None
self._queries = None
diff --git a/influxdb_client/domain/telegraf.py b/influxdb_client/domain/telegraf.py
index e8bf61fc..5c13078f 100644
--- a/influxdb_client/domain/telegraf.py
+++ b/influxdb_client/domain/telegraf.py
@@ -55,7 +55,7 @@ class Telegraf(TelegrafRequest):
def __init__(self, id=None, links=None, labels=None, name=None, description=None, metadata=None, config=None, org_id=None): # noqa: E501
"""Telegraf - a model defined in OpenAPI""" # noqa: E501
- TelegrafRequest.__init__(self, name=name, description=description, metadata=metadata, config=config, org_id=org_id)
+ TelegrafRequest.__init__(self, name=name, description=description, metadata=metadata, config=config, org_id=org_id) # noqa: E501
self._id = None
self._links = None
diff --git a/influxdb_client/domain/threshold.py b/influxdb_client/domain/threshold.py
index ced22a84..c9be39de 100644
--- a/influxdb_client/domain/threshold.py
+++ b/influxdb_client/domain/threshold.py
@@ -42,12 +42,14 @@ class Threshold(ThresholdBase):
}
discriminator_value_class_map = {
-
+ 'RangeThreshold': 'RangeThreshold',
+ 'LesserThreshold': 'LesserThreshold',
+ 'GreaterThreshold': 'GreaterThreshold'
}
def __init__(self, level=None, all_values=None): # noqa: E501
"""Threshold - a model defined in OpenAPI""" # noqa: E501
- ThresholdBase.__init__(self, level=level, all_values=all_values)
+ ThresholdBase.__init__(self, level=level, all_values=all_values) # noqa: E501
self.discriminator = 'type'
def get_real_child_model(self, data):
diff --git a/influxdb_client/domain/threshold_check.py b/influxdb_client/domain/threshold_check.py
index 3321036a..5691ba63 100644
--- a/influxdb_client/domain/threshold_check.py
+++ b/influxdb_client/domain/threshold_check.py
@@ -43,7 +43,7 @@ class ThresholdCheck(Check):
def __init__(self, type=None, thresholds=None): # noqa: E501
"""ThresholdCheck - a model defined in OpenAPI""" # noqa: E501
- Check.__init__(self)
+ Check.__init__(self) # noqa: E501
self._type = None
self._thresholds = None
diff --git a/influxdb_client/domain/xy_view_properties.py b/influxdb_client/domain/xy_view_properties.py
index e725f6bd..1ccc8b70 100644
--- a/influxdb_client/domain/xy_view_properties.py
+++ b/influxdb_client/domain/xy_view_properties.py
@@ -67,7 +67,7 @@ class XYViewProperties(ViewProperties):
def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, legend=None, x_column=None, y_column=None, shade_below=None, position=None, geom=None): # noqa: E501
"""XYViewProperties - a model defined in OpenAPI""" # noqa: E501
- ViewProperties.__init__(self)
+ ViewProperties.__init__(self) # noqa: E501
self._time_format = None
self._type = None
diff --git a/openapi-generator/src/main/java/org/influxdata/codegen/InfluxPythonGenerator.java b/openapi-generator/src/main/java/org/influxdata/codegen/InfluxPythonGenerator.java
index 71274118..c164bf19 100644
--- a/openapi-generator/src/main/java/org/influxdata/codegen/InfluxPythonGenerator.java
+++ b/openapi-generator/src/main/java/org/influxdata/codegen/InfluxPythonGenerator.java
@@ -112,6 +112,12 @@ public CodegenModel fromModel(final String name, final Schema model, final Map
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: