espark-core 0.4.4__py3-none-any.whl → 0.4.6__py3-none-any.whl

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.

Potentially problematic release.


This version of espark-core might be problematic. Click here for more details.

@@ -1,30 +1,30 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: espark-core
3
- Version: 0.4.4
3
+ Version: 0.4.6
4
4
  Summary: The core module of the Espark ESP32-based IoT device management framework.
5
5
  License: MIT
6
6
  Requires-Python: >=3.8
7
7
  Description-Content-Type: text/markdown
8
8
  License-File: LICENSE
9
- Requires-Dist: aiomqtt
10
- Requires-Dist: apscheduler
11
- Requires-Dist: fastapi
12
- Requires-Dist: packaging
13
- Requires-Dist: sqlalchemy
14
- Requires-Dist: sqlmodel
15
- Requires-Dist: uvicorn[standard]
9
+ Requires-Dist: aiomqtt>=2.4.0
10
+ Requires-Dist: apscheduler>=3.11.1
11
+ Requires-Dist: fastapi>=0.124.2
12
+ Requires-Dist: packaging>=25.0
13
+ Requires-Dist: sqlalchemy>=2.0.45
14
+ Requires-Dist: sqlmodel>=0.0.27
15
+ Requires-Dist: uvicorn[standard]>=0.38.0
16
16
  Provides-Extra: dev
17
- Requires-Dist: aiosqlite; extra == "dev"
18
- Requires-Dist: autopep8; extra == "dev"
19
- Requires-Dist: build; extra == "dev"
20
- Requires-Dist: fastapi-cli[standard-no-fastapi-cloud-cli]; extra == "dev"
21
- Requires-Dist: httpx; extra == "dev"
22
- Requires-Dist: pycodestyle; extra == "dev"
23
- Requires-Dist: pylint; extra == "dev"
24
- Requires-Dist: pytest; extra == "dev"
25
- Requires-Dist: pytest-asyncio; extra == "dev"
26
- Requires-Dist: pytest-cov; extra == "dev"
27
- Requires-Dist: twine; extra == "dev"
17
+ Requires-Dist: aiosqlite==0.21.0; extra == "dev"
18
+ Requires-Dist: autopep8==2.3.2; extra == "dev"
19
+ Requires-Dist: build==1.3.0; extra == "dev"
20
+ Requires-Dist: fastapi-cli[standard-no-fastapi-cloud-cli]==0.0.16; extra == "dev"
21
+ Requires-Dist: httpx==0.28.1; extra == "dev"
22
+ Requires-Dist: pycodestyle==2.14.0; extra == "dev"
23
+ Requires-Dist: pylint==4.0.4; extra == "dev"
24
+ Requires-Dist: pytest==9.0.2; extra == "dev"
25
+ Requires-Dist: pytest-asyncio==1.3.0; extra == "dev"
26
+ Requires-Dist: pytest-cov==7.0.0; extra == "dev"
27
+ Requires-Dist: twine==6.2.0; extra == "dev"
28
28
  Dynamic: description
29
29
  Dynamic: description-content-type
30
30
  Dynamic: license
@@ -1,4 +1,4 @@
1
- espark_core-0.4.4.dist-info/licenses/LICENSE,sha256=wkIXJHYIspOGVvn_ajKyLucpIyw9_pO3QExFcNTCY78,1065
1
+ espark_core-0.4.6.dist-info/licenses/LICENSE,sha256=wkIXJHYIspOGVvn_ajKyLucpIyw9_pO3QExFcNTCY78,1065
2
2
  esparkcore/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  esparkcore/constants.py,sha256=uI0bVa78CZa-ftlyTRMqWSBK275iDB1l8g1TmtJ1FGg,378
4
4
  esparkcore/data/__init__.py,sha256=abMOPq6jC5qOQCl9j7iPDv8iyjzDF-oVd_gW0la5kL4,45
@@ -23,10 +23,10 @@ esparkcore/schedules/__init__.py,sha256=v5Wy3Cbt2AnudGMGXv_Cyaa10s6NAmP66rDjcMSv
23
23
  esparkcore/schedules/outbox.py,sha256=GGANvjkI7w1BdmmVRgKog498ASD_xRN0g8bG6yC_SN4,811
24
24
  esparkcore/schedules/scheduler.py,sha256=aYQXImLZ4tW-hRavn3ObuV3lYjmOZD813YkeG1NsYfY,170
25
25
  esparkcore/services/__init__.py,sha256=RIZOHBfkWn3HsApdA5rH9EZbbXGq0NfiGoOWDO_JX1k,30
26
- esparkcore/services/mqtt.py,sha256=9MOlFIKtR42CuOfX-kEd-DT2od7mXtbD-0B8dNHqplg,6279
26
+ esparkcore/services/mqtt.py,sha256=Ey2pEkG8sTgX7MQqX1z3Y_5ATwBnacJuf18F_u59_lg,6575
27
27
  esparkcore/utils/__init__.py,sha256=rzuCJUAaQl-yPhM1vcWB_1zVXqtA71ChYP2aM_3UfKk,42
28
28
  esparkcore/utils/logging.py,sha256=sRO8uOcPkFH-DwepqLOTS2qGaopXpMdVOjzZL6RpGs4,257
29
- espark_core-0.4.4.dist-info/METADATA,sha256=3_BP8B1hSRGgvv2jbL9-O3uZ5_z4QKnL52ql8vp9nBw,6161
30
- espark_core-0.4.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
- espark_core-0.4.4.dist-info/top_level.txt,sha256=hXVyhIPB4aGskFm5queWALxDPhcDkrN7_8vcjwA1iE4,11
32
- espark_core-0.4.4.dist-info/RECORD,,
29
+ espark_core-0.4.6.dist-info/METADATA,sha256=WPVXe9KrUdp_5--dImoyu3S9vwRQYtEPcsoWB6SWEZw,6296
30
+ espark_core-0.4.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
+ espark_core-0.4.6.dist-info/top_level.txt,sha256=hXVyhIPB4aGskFm5queWALxDPhcDkrN7_8vcjwA1iE4,11
32
+ espark_core-0.4.6.dist-info/RECORD,,
@@ -50,7 +50,14 @@ class MQTTManager:
50
50
 
51
51
  await self.device_repo.add(session, device)
52
52
 
53
- latest_version = await self.version_repo.get(session, AppVersion.id == payload['app_name'])
53
+ latest_version = await self.version_repo.get(session, AppVersion.id == payload['app_name'])
54
+ if not latest_version:
55
+ latest_version = AppVersion()
56
+ latest_version.id = payload['app_name']
57
+ latest_version.version = payload['app_version']
58
+
59
+ await self.version_repo.add(session, latest_version)
60
+
54
61
  current_version = Version(payload['app_version'])
55
62
 
56
63
  if Version(latest_version.version) > current_version: