ironflock 1.3.2__tar.gz → 1.3.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ironflock
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: IronFlock Python SDK for connecting to the IronFlock Platform
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ironflock"
3
- version = "1.3.2"
3
+ version = "1.3.3"
4
4
  description = "IronFlock Python SDK for connecting to the IronFlock Platform"
5
5
  authors = [
6
6
  {name = "Marko Petzold, IronFlock GmbH", email = "info@ironflock.com"}
@@ -7,4 +7,4 @@ __all__ = [
7
7
  "Stage"
8
8
  ]
9
9
 
10
- __version__ = "1.3.2"
10
+ __version__ = "1.3.3"
@@ -222,9 +222,15 @@ class IronFlock:
222
222
 
223
223
  # Convert options dict to RegisterOptions if provided
224
224
  register_options = RegisterOptions(**options) if options else None
225
+
226
+ swarm_key = os.environ.get("SWARM_KEY")
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}"
225
231
 
226
232
  try:
227
- reg = await self._connection.register(topic, endpoint, options=register_options)
233
+ reg = await self._connection.register(full_topic, endpoint, options=register_options)
228
234
  return reg
229
235
  except Exception as e:
230
236
  print(f"Register failed: {e}")
@@ -382,7 +388,7 @@ class IronFlock:
382
388
  sub = await self.subscribe(topic, handler, params.options)
383
389
  return sub
384
390
 
385
- async def getHistory(self, tablename: str, queryParams: Union[TableQueryParams, dict]) -> Optional[Any]:
391
+ async def getHistory(self, tablename: str, queryParams: Union[TableQueryParams, dict] = {"limit": 10}) -> Optional[Any]:
386
392
  """Get historical data from a table using the history service
387
393
 
388
394
  Calls the "history.table" topic with the specified table name and query parameters.
File without changes
File without changes