ironflock 1.3.3__py3-none-any.whl → 1.3.5__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.
- ironflock/CrossbarConnection.py +5 -3
- ironflock/__init__.py +1 -1
- ironflock/ironflock.py +6 -5
- {ironflock-1.3.3.dist-info → ironflock-1.3.5.dist-info}/METADATA +5 -5
- ironflock-1.3.5.dist-info/RECORD +8 -0
- ironflock-1.3.3.dist-info/RECORD +0 -8
- {ironflock-1.3.3.dist-info → ironflock-1.3.5.dist-info}/WHEEL +0 -0
- {ironflock-1.3.3.dist-info → ironflock-1.3.5.dist-info}/licenses/LICENSE +0 -0
ironflock/CrossbarConnection.py
CHANGED
|
@@ -28,13 +28,13 @@ def getSerialNumber(serial_number: str = None) -> str:
|
|
|
28
28
|
s_num = serial_number
|
|
29
29
|
return s_num
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
STUDIO_DEV_WS_URI = "wss://cbw.ironflock.dev/ws-ua-usr"
|
|
32
32
|
STUDIO_WS_URI_OLD = "wss://cbw.record-evolution.com/ws-ua-usr"
|
|
33
33
|
STUDIO_WS_URI = "wss://cbw.ironflock.com/ws-ua-usr"
|
|
34
34
|
LOCALHOST_WS_URI = "ws://localhost:8080/ws-ua-usr"
|
|
35
35
|
|
|
36
36
|
socketURIMap = {
|
|
37
|
-
"https://studio.
|
|
37
|
+
"https://studio.ironflock.dev": STUDIO_DEV_WS_URI,
|
|
38
38
|
"https://studio.record-evolution.com": STUDIO_WS_URI_OLD,
|
|
39
39
|
"https://studio.ironflock.com": STUDIO_WS_URI,
|
|
40
40
|
"http://localhost:8086": LOCALHOST_WS_URI,
|
|
@@ -196,7 +196,9 @@ class CrossbarConnection:
|
|
|
196
196
|
async def stop(self) -> None:
|
|
197
197
|
"""Stop the connection"""
|
|
198
198
|
if self.component:
|
|
199
|
-
|
|
199
|
+
# Check if component is properly initialized before stopping
|
|
200
|
+
if hasattr(self.component, '_done_f') and self.component._done_f is not None:
|
|
201
|
+
await self.component.stop()
|
|
200
202
|
self._is_connected = False
|
|
201
203
|
self.session = None
|
|
202
204
|
|
ironflock/__init__.py
CHANGED
ironflock/ironflock.py
CHANGED
|
@@ -39,6 +39,7 @@ class IronFlock:
|
|
|
39
39
|
self._app_name = os.environ.get("APP_NAME")
|
|
40
40
|
self._swarm_key = int(os.environ.get("SWARM_KEY"))
|
|
41
41
|
self._app_key = int(os.environ.get("APP_KEY"))
|
|
42
|
+
self._env = os.environ.get("ENV")
|
|
42
43
|
self._connection = CrossbarConnection()
|
|
43
44
|
self.mainFunc = mainFunc
|
|
44
45
|
self._main_task = None
|
|
@@ -223,14 +224,11 @@ class IronFlock:
|
|
|
223
224
|
# Convert options dict to RegisterOptions if provided
|
|
224
225
|
register_options = RegisterOptions(**options) if options else None
|
|
225
226
|
|
|
226
|
-
|
|
227
|
-
app_key = os.environ.get("APP_KEY")
|
|
228
|
-
env_value = os.environ.get("ENV")
|
|
229
|
-
|
|
230
|
-
full_topic = f"{swarm_key}.{self._device_key}.{app_key}.{env_value}.{topic}"
|
|
227
|
+
full_topic = f"{self._swarm_key}.{self._device_key}.{self._app_key}.{self._env}.{topic}"
|
|
231
228
|
|
|
232
229
|
try:
|
|
233
230
|
reg = await self._connection.register(full_topic, endpoint, options=register_options)
|
|
231
|
+
print(f"Function registered for IronFlock topic '{topic}'. (Full WAMP topic: '{full_topic}')")
|
|
234
232
|
return reg
|
|
235
233
|
except Exception as e:
|
|
236
234
|
print(f"Register failed: {e}")
|
|
@@ -489,6 +487,9 @@ class IronFlock:
|
|
|
489
487
|
# If no main function, just wait indefinitely
|
|
490
488
|
while self.is_connected:
|
|
491
489
|
await asyncio.sleep(1)
|
|
490
|
+
except asyncio.CancelledError:
|
|
491
|
+
# Task was cancelled (likely from stop() being called)
|
|
492
|
+
pass
|
|
492
493
|
except KeyboardInterrupt:
|
|
493
494
|
print("Shutting down...")
|
|
494
495
|
except Exception as e:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ironflock
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.5
|
|
4
4
|
Summary: IronFlock Python SDK for connecting to the IronFlock Platform
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Author: Marko Petzold, IronFlock GmbH
|
|
8
8
|
Author-email: info@ironflock.com
|
|
9
|
-
Requires-Python: >=3.
|
|
9
|
+
Requires-Python: >=3.11
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Provides-Extra: dev
|
|
@@ -17,7 +17,7 @@ Requires-Dist: pydantic (>=2.0.0)
|
|
|
17
17
|
Requires-Dist: pydantic ; extra == "dev"
|
|
18
18
|
Requires-Dist: pytest ; extra == "dev"
|
|
19
19
|
Requires-Dist: ruff ; extra == "dev"
|
|
20
|
-
Requires-Dist: sphinx (>=
|
|
20
|
+
Requires-Dist: sphinx (>=8.2.3) ; extra == "docs"
|
|
21
21
|
Requires-Dist: sphinx-autodoc-typehints (>=2.0) ; extra == "docs"
|
|
22
22
|
Requires-Dist: sphinx-book-theme (>=1.1.4) ; extra == "docs"
|
|
23
23
|
Project-URL: Homepage, https://github.com/RecordEvolution/ironflock-py
|
|
@@ -38,8 +38,7 @@ For more information on the IronFlock IoT Devops Platform for engineers and deve
|
|
|
38
38
|
|
|
39
39
|
## Requirements
|
|
40
40
|
|
|
41
|
-
- Python 3.
|
|
42
|
-
- Compatible with Python 3.8, 3.9, 3.10, 3.11, and 3.12
|
|
41
|
+
- Python 3.11 or higher
|
|
43
42
|
|
|
44
43
|
## Installation
|
|
45
44
|
|
|
@@ -97,6 +96,7 @@ Install the necessary build tools if you don't have them already:
|
|
|
97
96
|
pip install --upgrade build twine
|
|
98
97
|
```
|
|
99
98
|
|
|
99
|
+
Make sure your pypi API tokens are stored in your `~/.pypirc`.
|
|
100
100
|
Build and publish a new pypi package:
|
|
101
101
|
|
|
102
102
|
```shell
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
ironflock/CrossbarConnection.py,sha256=WcxFl7ai_59G3-_AdPAMU1mE0TWDaQ1qLARG0rIyMPk,14151
|
|
2
|
+
ironflock/__init__.py,sha256=z08UA2gCpcdUHs06NFDyMU-M6snTEj4w2Tc3fIfMpmA,203
|
|
3
|
+
ironflock/ironflock.py,sha256=sLP0Mfp3bgtyE0Qv7LTUDOY8YlRDM0PxJG8eZplluoU,19536
|
|
4
|
+
ironflock/types.py,sha256=yync91abyrI1fqbmczW5My7Skx7-8soENGHK2JfaEz0,11962
|
|
5
|
+
ironflock-1.3.5.dist-info/METADATA,sha256=a-rQlncmWiTlRYEIOepZj9aXQsVWO76AeFiAQxlfyeA,3472
|
|
6
|
+
ironflock-1.3.5.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
7
|
+
ironflock-1.3.5.dist-info/licenses/LICENSE,sha256=GpUKjPB381nmkbBIdX74vxXhsNZaNpngTOciss39Pjk,1073
|
|
8
|
+
ironflock-1.3.5.dist-info/RECORD,,
|
ironflock-1.3.3.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
ironflock/CrossbarConnection.py,sha256=JLMmmnlv3I0Mohz6XdqyQ8-M_qPo3zs_hyIBthFvcTQ,13976
|
|
2
|
-
ironflock/__init__.py,sha256=_07bufEcjL-TSWKyBCtXEVh2CxAQGsT3w9p10pgHMxU,203
|
|
3
|
-
ironflock/ironflock.py,sha256=9BVEDCjFI0uoqA-yz_th9LynkVFbtMSnA4Bj4Tsc4JA,19395
|
|
4
|
-
ironflock/types.py,sha256=yync91abyrI1fqbmczW5My7Skx7-8soENGHK2JfaEz0,11962
|
|
5
|
-
ironflock-1.3.3.dist-info/METADATA,sha256=kxAJohNFrdmYSIIg-_-vpCwAsnRpCAYUf_GWds-BzTU,3459
|
|
6
|
-
ironflock-1.3.3.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
7
|
-
ironflock-1.3.3.dist-info/licenses/LICENSE,sha256=GpUKjPB381nmkbBIdX74vxXhsNZaNpngTOciss39Pjk,1073
|
|
8
|
-
ironflock-1.3.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|