ironflock 1.2.1__py3-none-any.whl → 1.3.0__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/__init__.py +1 -1
- ironflock/ironflock.py +12 -4
- {ironflock-1.2.1.dist-info → ironflock-1.3.0.dist-info}/METADATA +1 -1
- ironflock-1.3.0.dist-info/RECORD +7 -0
- ironflock-1.2.1.dist-info/RECORD +0 -7
- {ironflock-1.2.1.dist-info → ironflock-1.3.0.dist-info}/WHEEL +0 -0
- {ironflock-1.2.1.dist-info → ironflock-1.3.0.dist-info}/licenses/LICENSE +0 -0
ironflock/__init__.py
CHANGED
ironflock/ironflock.py
CHANGED
|
@@ -160,7 +160,7 @@ class IronFlock:
|
|
|
160
160
|
print(f"Set location failed: {e}")
|
|
161
161
|
return None
|
|
162
162
|
|
|
163
|
-
async def
|
|
163
|
+
async def register_function(self, topic: str, endpoint, options: Optional[dict] = None) -> Optional[Any]:
|
|
164
164
|
"""Registers a function with the IronFlock Platform Message Router
|
|
165
165
|
|
|
166
166
|
Args:
|
|
@@ -185,6 +185,10 @@ class IronFlock:
|
|
|
185
185
|
print(f"Register failed: {e}")
|
|
186
186
|
return None
|
|
187
187
|
|
|
188
|
+
async def register(self, topic: str, endpoint, options: Optional[dict] = None) -> Optional[Any]:
|
|
189
|
+
"""Alias for register_function() for backward compatibility"""
|
|
190
|
+
return await self.register_function(topic, endpoint, options)
|
|
191
|
+
|
|
188
192
|
async def subscribe(self, topic: str, handler, options: Optional[dict] = None) -> Optional[Any]:
|
|
189
193
|
"""Subscribes to a topic on the IronFlock Platform Message Router
|
|
190
194
|
|
|
@@ -302,7 +306,11 @@ class IronFlock:
|
|
|
302
306
|
if self._connection:
|
|
303
307
|
await self._connection.stop()
|
|
304
308
|
|
|
305
|
-
|
|
309
|
+
def run(self):
|
|
310
|
+
"""Synchronous wrapper to run the IronFlock instance (original API)"""
|
|
311
|
+
asyncio.run(self.run_async())
|
|
312
|
+
|
|
313
|
+
async def run_async(self):
|
|
306
314
|
"""Start the connection and keep it running"""
|
|
307
315
|
await self.start()
|
|
308
316
|
|
|
@@ -323,5 +331,5 @@ class IronFlock:
|
|
|
323
331
|
await self.stop()
|
|
324
332
|
|
|
325
333
|
def run_sync(self):
|
|
326
|
-
"""
|
|
327
|
-
|
|
334
|
+
"""Alias for run() method for clarity"""
|
|
335
|
+
return self.run()
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
ironflock/CrossbarConnection.py,sha256=kWoWQ8TqZORq5XhuL3-c22yIFBzGMpRbCZpztKPMNyQ,12802
|
|
2
|
+
ironflock/__init__.py,sha256=hciT8PV9Jj98wAiZlF9U39wBy6l1DmrI50YaYOnC7qU,203
|
|
3
|
+
ironflock/ironflock.py,sha256=0FLzGMHL83SnFOobKBqL4tcE-6430nASGwn4gnH1LXc,12019
|
|
4
|
+
ironflock-1.3.0.dist-info/METADATA,sha256=dqwaM0pGgwiXSuWQ6zjfqkwHqkjJYgtPR4Xpbzy7do4,3425
|
|
5
|
+
ironflock-1.3.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
6
|
+
ironflock-1.3.0.dist-info/licenses/LICENSE,sha256=GpUKjPB381nmkbBIdX74vxXhsNZaNpngTOciss39Pjk,1073
|
|
7
|
+
ironflock-1.3.0.dist-info/RECORD,,
|
ironflock-1.2.1.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
ironflock/CrossbarConnection.py,sha256=kWoWQ8TqZORq5XhuL3-c22yIFBzGMpRbCZpztKPMNyQ,12802
|
|
2
|
-
ironflock/__init__.py,sha256=5DreQfXO9MKAaEDxHm_L2fzCdbt9gRg3K8bV--ESoMo,203
|
|
3
|
-
ironflock/ironflock.py,sha256=3Qd4VvrxTn5nekRZhwIzj_XFbr3Mayct0XzCkYSwK-8,11674
|
|
4
|
-
ironflock-1.2.1.dist-info/METADATA,sha256=4ZU45mFIsw8wQ5mMiMRySmtjFwSG2jwmuXfhzr--_BM,3425
|
|
5
|
-
ironflock-1.2.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
6
|
-
ironflock-1.2.1.dist-info/licenses/LICENSE,sha256=GpUKjPB381nmkbBIdX74vxXhsNZaNpngTOciss39Pjk,1073
|
|
7
|
-
ironflock-1.2.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|