python-chargepoint 2.1.0__tar.gz → 2.2.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.
- {python_chargepoint-2.1.0 → python_chargepoint-2.2.0}/PKG-INFO +1 -1
- {python_chargepoint-2.1.0 → python_chargepoint-2.2.0}/pyproject.toml +1 -1
- {python_chargepoint-2.1.0 → python_chargepoint-2.2.0}/python_chargepoint/types.py +26 -18
- {python_chargepoint-2.1.0 → python_chargepoint-2.2.0}/LICENSE +0 -0
- {python_chargepoint-2.1.0 → python_chargepoint-2.2.0}/README.md +0 -0
- {python_chargepoint-2.1.0 → python_chargepoint-2.2.0}/python_chargepoint/__init__.py +0 -0
- {python_chargepoint-2.1.0 → python_chargepoint-2.2.0}/python_chargepoint/__main__.py +0 -0
- {python_chargepoint-2.1.0 → python_chargepoint-2.2.0}/python_chargepoint/client.py +0 -0
- {python_chargepoint-2.1.0 → python_chargepoint-2.2.0}/python_chargepoint/constants.py +0 -0
- {python_chargepoint-2.1.0 → python_chargepoint-2.2.0}/python_chargepoint/exceptions.py +0 -0
- {python_chargepoint-2.1.0 → python_chargepoint-2.2.0}/python_chargepoint/global_config.py +0 -0
- {python_chargepoint-2.1.0 → python_chargepoint-2.2.0}/python_chargepoint/session.py +0 -0
|
@@ -12,13 +12,21 @@ def _parse_ms_timestamp(v: float) -> datetime:
|
|
|
12
12
|
return datetime.fromtimestamp(v / 1000, tz=timezone.utc)
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class _BaseModel(BaseModel):
|
|
16
|
+
"""Base for all library models. Passes through undeclared API fields for diagnostic use."""
|
|
17
|
+
|
|
18
|
+
model_config = ConfigDict(extra="allow")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class _CamelModel(_BaseModel):
|
|
16
22
|
"""Base for models whose API responses use camelCase field names."""
|
|
17
23
|
|
|
18
|
-
model_config = ConfigDict(
|
|
24
|
+
model_config = ConfigDict(
|
|
25
|
+
alias_generator=to_camel, populate_by_name=True, extra="allow"
|
|
26
|
+
)
|
|
19
27
|
|
|
20
28
|
|
|
21
|
-
class ElectricVehicle(
|
|
29
|
+
class ElectricVehicle(_BaseModel):
|
|
22
30
|
make: str = ""
|
|
23
31
|
model: str = ""
|
|
24
32
|
primary_vehicle: bool = False
|
|
@@ -56,7 +64,7 @@ class User(_CamelModel):
|
|
|
56
64
|
username: str = ""
|
|
57
65
|
|
|
58
66
|
|
|
59
|
-
class AccountBalance(
|
|
67
|
+
class AccountBalance(_BaseModel):
|
|
60
68
|
account_number: str = Field("", alias="accountNumber")
|
|
61
69
|
account_state: str = Field("", alias="accountState")
|
|
62
70
|
amount: str = ""
|
|
@@ -158,14 +166,14 @@ class HomeChargerConfiguration(_CamelModel):
|
|
|
158
166
|
return {**settings, "led_brightness": led_brightness}
|
|
159
167
|
|
|
160
168
|
|
|
161
|
-
class Station(
|
|
169
|
+
class Station(_BaseModel):
|
|
162
170
|
id: int = Field(0, alias="deviceId")
|
|
163
171
|
name: str = ""
|
|
164
172
|
latitude: float = Field(0.0, alias="lat")
|
|
165
173
|
longitude: float = Field(0.0, alias="lon")
|
|
166
174
|
|
|
167
175
|
|
|
168
|
-
class UserChargingStatus(
|
|
176
|
+
class UserChargingStatus(_BaseModel):
|
|
169
177
|
session_id: int = Field(0, alias="sessionId")
|
|
170
178
|
start_time: datetime = Field(
|
|
171
179
|
default_factory=lambda: datetime.now(tz=timezone.utc), alias="startTimeUTC"
|
|
@@ -194,7 +202,7 @@ class UserChargingStatus(BaseModel):
|
|
|
194
202
|
return self
|
|
195
203
|
|
|
196
204
|
|
|
197
|
-
class VehicleInfo(
|
|
205
|
+
class VehicleInfo(_BaseModel):
|
|
198
206
|
vehicle_id: int = 0
|
|
199
207
|
battery_capacity: float = 0.0
|
|
200
208
|
make: str = ""
|
|
@@ -204,7 +212,7 @@ class VehicleInfo(BaseModel):
|
|
|
204
212
|
is_primary_vehicle: bool = False
|
|
205
213
|
|
|
206
214
|
|
|
207
|
-
class ChargingSessionUpdate(
|
|
215
|
+
class ChargingSessionUpdate(_BaseModel):
|
|
208
216
|
energy_kwh: float = 0.0
|
|
209
217
|
power_kw: float = 0.0
|
|
210
218
|
timestamp: datetime = Field(default_factory=lambda: datetime.now(tz=timezone.utc))
|
|
@@ -215,20 +223,20 @@ class ChargingSessionUpdate(BaseModel):
|
|
|
215
223
|
return _parse_ms_timestamp(v)
|
|
216
224
|
|
|
217
225
|
|
|
218
|
-
class PowerUtilityPlan(
|
|
226
|
+
class PowerUtilityPlan(_BaseModel):
|
|
219
227
|
code: Union[str, int] = ""
|
|
220
228
|
id: int = 0
|
|
221
229
|
is_ev_plan: bool = False
|
|
222
230
|
name: str = ""
|
|
223
231
|
|
|
224
232
|
|
|
225
|
-
class PowerUtility(
|
|
233
|
+
class PowerUtility(_BaseModel):
|
|
226
234
|
id: int = 0
|
|
227
235
|
name: str = ""
|
|
228
236
|
plans: List[PowerUtilityPlan] = Field(default_factory=list)
|
|
229
237
|
|
|
230
238
|
|
|
231
|
-
class MapFilter(
|
|
239
|
+
class MapFilter(_BaseModel):
|
|
232
240
|
disabled_parking: bool = False
|
|
233
241
|
network_circuitelectric: bool = False
|
|
234
242
|
connector_l2: bool = False
|
|
@@ -254,7 +262,7 @@ class MapFilter(BaseModel):
|
|
|
254
262
|
connector_tesla: bool = False
|
|
255
263
|
|
|
256
264
|
|
|
257
|
-
class StationPort(
|
|
265
|
+
class StationPort(_BaseModel):
|
|
258
266
|
status_v2: str = ""
|
|
259
267
|
port_type: int = 0
|
|
260
268
|
outlet_number: int = 0
|
|
@@ -263,12 +271,12 @@ class StationPort(BaseModel):
|
|
|
263
271
|
status: str = ""
|
|
264
272
|
|
|
265
273
|
|
|
266
|
-
class MaxPower(
|
|
274
|
+
class MaxPower(_BaseModel):
|
|
267
275
|
unit: str = ""
|
|
268
276
|
max: float = 0.0
|
|
269
277
|
|
|
270
278
|
|
|
271
|
-
class MapChargingInfo(
|
|
279
|
+
class MapChargingInfo(_BaseModel):
|
|
272
280
|
session_id: int = 0
|
|
273
281
|
session_time: int = 0
|
|
274
282
|
energy_kwh: float = 0.0
|
|
@@ -326,13 +334,13 @@ class StationNetwork(_CamelModel):
|
|
|
326
334
|
in_network: bool = False
|
|
327
335
|
|
|
328
336
|
|
|
329
|
-
class StationAddress(
|
|
337
|
+
class StationAddress(_BaseModel):
|
|
330
338
|
address1: str = ""
|
|
331
339
|
city: str = ""
|
|
332
340
|
state: str = ""
|
|
333
341
|
|
|
334
342
|
|
|
335
|
-
class StationPricingFee(
|
|
343
|
+
class StationPricingFee(_BaseModel):
|
|
336
344
|
amount: float = 0.0
|
|
337
345
|
unit: str = ""
|
|
338
346
|
|
|
@@ -345,7 +353,7 @@ class StationTouEntry(_CamelModel):
|
|
|
345
353
|
fee: StationPricingFee = Field(default_factory=StationPricingFee)
|
|
346
354
|
|
|
347
355
|
|
|
348
|
-
class StationTax(
|
|
356
|
+
class StationTax(_BaseModel):
|
|
349
357
|
name: str = ""
|
|
350
358
|
percent: float = 0.0
|
|
351
359
|
|
|
@@ -391,7 +399,7 @@ class StationInfo(_CamelModel):
|
|
|
391
399
|
last_charged_date: Optional[str] = None
|
|
392
400
|
|
|
393
401
|
|
|
394
|
-
class MapStation(
|
|
402
|
+
class MapStation(_BaseModel):
|
|
395
403
|
device_id: int = 0
|
|
396
404
|
lat: float = 0.0
|
|
397
405
|
lon: float = 0.0
|
|
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
|