climify_api 1.0.27__tar.gz → 1.0.28__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.
- {climify_api-1.0.27 → climify_api-1.0.28}/PKG-INFO +1 -1
- {climify_api-1.0.27 → climify_api-1.0.28}/pyproject.toml +2 -2
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/__init__.py +2 -2
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/metering_points_id/get.py +71 -29
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api.egg-info/PKG-INFO +1 -1
- {climify_api-1.0.27 → climify_api-1.0.28}/LICENSE +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/MANIFEST.in +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/README.md +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/setup.cfg +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/ApiController.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/REST.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/api_client.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/PathBase.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/ApiController.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/buildings_id/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/buildings_id/get.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/buildings_id_devices/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/buildings_id_devices/get.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/buildings_id_metering_points/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/buildings_id_metering_points/get.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/devices_id/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/devices_id/get.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/feedback_forms_id_locations_id_responses/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/feedback_forms_id_locations_id_responses/get.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/locations_id/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/locations_id/get.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/locations_id_change_temperature/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/locations_id_change_temperature/post.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/locations_id_devices/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/locations_id_devices/get.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/locations_id_sensor_values/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/locations_id_sensor_values/get.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/maps_id/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/maps_id/get.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/maps_id_devices/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/maps_id_devices/get.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/metering_points_id/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/organisations_id/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/organisations_id/get.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/organisations_id_devices/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/organisations_id_devices/get.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/resources/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/resources/get.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/auth.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/configuration.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/exceptions.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/models/__init__.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/schemas.py +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api.egg-info/SOURCES.txt +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api.egg-info/dependency_links.txt +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api.egg-info/requires.txt +0 -0
- {climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api.egg-info/top_level.txt +0 -0
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "climify_api"
|
|
9
|
-
version = "1.0.
|
|
9
|
+
version = "1.0.28"
|
|
10
10
|
keywords=['Climify','Environmental engineering']
|
|
11
11
|
authors = [
|
|
12
12
|
{ name="Climify Aps", email="info@climify.com" },
|
|
@@ -50,7 +50,7 @@ Homepage = "https://gitlab.climify.com/climify/python-api-lib"
|
|
|
50
50
|
Issues = "https://gitlab.climify.com/climify/python-api-lib/-/issues"
|
|
51
51
|
|
|
52
52
|
[tool.bumpver]
|
|
53
|
-
current_version = "1.0.
|
|
53
|
+
current_version = "1.0.28"
|
|
54
54
|
version_pattern = "MAJOR.MINOR.PATCH"
|
|
55
55
|
commit_message = "Bump version {old_version} -> {new_version}"
|
|
56
56
|
commit = true
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
Provides a REST endpoints for Climify applications and 3rd party solutions. # noqa: E501
|
|
10
10
|
|
|
11
|
-
The version of the OpenAPI document: 1.0.
|
|
11
|
+
The version of the OpenAPI document: 1.0.28
|
|
12
12
|
Generated by: https://openapi-generator.tech
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
__name__ = 'climify_api'
|
|
16
|
-
__version__ = "1.0.
|
|
16
|
+
__version__ = "1.0.28"
|
|
17
17
|
|
|
18
18
|
# import ApiClient
|
|
19
19
|
from climify_api.api_client import ApiClient
|
{climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/metering_points_id/get.py
RENAMED
|
@@ -112,39 +112,81 @@ class GetMeteringPointValuesById(PathBase):
|
|
|
112
112
|
subRequestToTime = to_datetime
|
|
113
113
|
subRequestFromTime = max(subRequestToTime - relativedelta(months=3), from_datetime)
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
115
|
+
while subRequestFromTime >= from_datetime:
|
|
116
|
+
query_parameters = []
|
|
117
|
+
for name, value in (
|
|
118
|
+
('dateTimeFrom', subRequestFromTime.replace(tzinfo=None).isoformat()+'Z' if subRequestFromTime else None), # Sets timezone to None, to remove +HH:MM
|
|
119
|
+
('dateTimeTo', subRequestToTime.replace(tzinfo=None).isoformat()+'Z' if subRequestToTime else None)
|
|
120
|
+
):
|
|
121
|
+
if value:
|
|
122
|
+
query_parameters.append(f"{name}={value}")
|
|
123
|
+
|
|
124
|
+
if len(query_parameters) > 0:
|
|
125
|
+
requests.append("?" + "&".join(query_parameters))
|
|
126
|
+
|
|
127
|
+
if subRequestFromTime == from_datetime:
|
|
128
|
+
break
|
|
129
|
+
|
|
130
|
+
subRequestToTime = subRequestFromTime - relativedelta(seconds=1)
|
|
131
|
+
subRequestFromTime = max(subRequestToTime - relativedelta(months=3), from_datetime)
|
|
132
|
+
|
|
133
|
+
bodies = []
|
|
134
|
+
for request in requests:
|
|
135
|
+
requestPath = usedPath+request
|
|
136
|
+
response = self.api_client.call_api(
|
|
137
|
+
resource_path=requestPath,
|
|
138
|
+
method='GET',
|
|
139
|
+
access_token=access_token,
|
|
140
|
+
stream=stream,
|
|
141
|
+
timeout=timeout
|
|
133
142
|
)
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
143
|
+
|
|
144
|
+
# Format response
|
|
145
|
+
if not 200 <= response.status <= 299:
|
|
146
|
+
raise ClimifyApiException(
|
|
147
|
+
status=response.status,
|
|
148
|
+
reason=response.reason,
|
|
149
|
+
api_response=response
|
|
150
|
+
)
|
|
137
151
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
152
|
+
if skip_deserialization:
|
|
153
|
+
bodies.append(response.data)
|
|
154
|
+
continue
|
|
155
|
+
|
|
156
|
+
deserialized_body = parse_raw_as(List[SensorDataExtDto],response.data) if response.data\
|
|
157
|
+
else []
|
|
158
|
+
|
|
159
|
+
# Sort observations on time
|
|
160
|
+
for sensor in deserialized_body:
|
|
161
|
+
sensor.data = sorted(sensor.data, key=lambda x: x.time, reverse=True)
|
|
162
|
+
|
|
163
|
+
if as_dataframe:
|
|
164
|
+
deserialized_body = convert_values_to_dataFrame(deserialized_body)
|
|
142
165
|
|
|
143
|
-
|
|
166
|
+
bodies.append(deserialized_body)
|
|
167
|
+
|
|
168
|
+
if skip_deserialization:
|
|
169
|
+
response.data = bodies
|
|
170
|
+
return ClimifyApiResponseWithoutDeserialization(response=response)
|
|
171
|
+
|
|
172
|
+
sensors = {}
|
|
173
|
+
for body in bodies:
|
|
174
|
+
for sensor in body:
|
|
175
|
+
if sensor.devId not in sensors:
|
|
176
|
+
sensors[sensor.devId] = sensor
|
|
177
|
+
continue
|
|
178
|
+
|
|
179
|
+
sensor_data = sensors[sensor.devId]
|
|
180
|
+
if as_dataframe:
|
|
181
|
+
sensor_data.data = concat([sensor_data.data, sensor.data], ignore_index=True)
|
|
182
|
+
else:
|
|
183
|
+
sensor_data.data += sensor.data
|
|
184
|
+
|
|
185
|
+
deserialized_body = list(sensors.values())
|
|
186
|
+
|
|
187
|
+
return ClimifyApiResponse[List[SensorDataExtDto]](
|
|
144
188
|
response=response,
|
|
145
189
|
status=response.status,
|
|
146
190
|
body=deserialized_body,
|
|
147
191
|
headers=response.headers
|
|
148
|
-
)
|
|
149
|
-
|
|
150
|
-
return api_response
|
|
192
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/buildings_id/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/buildings_id_devices/get.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/devices_id/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/locations_id/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/locations_id_devices/get.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/maps_id_devices/__init__.py
RENAMED
|
File without changes
|
{climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/maps_id_devices/get.py
RENAMED
|
File without changes
|
|
File without changes
|
{climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/organisations_id/__init__.py
RENAMED
|
File without changes
|
{climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/organisations_id/get.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climify_api-1.0.27 → climify_api-1.0.28}/src/climify_api/apis/v1/paths/resources/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|