ironflock 1.0.6__tar.gz → 1.0.8__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.
- {ironflock-1.0.6/ironflock.egg-info → ironflock-1.0.8}/PKG-INFO +2 -2
- {ironflock-1.0.6 → ironflock-1.0.8}/README.md +1 -1
- {ironflock-1.0.6 → ironflock-1.0.8}/ironflock/__init__.py +1 -1
- {ironflock-1.0.6 → ironflock-1.0.8}/ironflock/ironflock.py +28 -2
- {ironflock-1.0.6 → ironflock-1.0.8/ironflock.egg-info}/PKG-INFO +2 -2
- {ironflock-1.0.6 → ironflock-1.0.8}/setup.py +1 -1
- {ironflock-1.0.6 → ironflock-1.0.8}/LICENSE +0 -0
- {ironflock-1.0.6 → ironflock-1.0.8}/MANIFEST.in +0 -0
- {ironflock-1.0.6 → ironflock-1.0.8}/ironflock/AutobahnConnection.py +0 -0
- {ironflock-1.0.6 → ironflock-1.0.8}/ironflock.egg-info/SOURCES.txt +0 -0
- {ironflock-1.0.6 → ironflock-1.0.8}/ironflock.egg-info/dependency_links.txt +0 -0
- {ironflock-1.0.6 → ironflock-1.0.8}/ironflock.egg-info/requires.txt +0 -0
- {ironflock-1.0.6 → ironflock-1.0.8}/ironflock.egg-info/top_level.txt +0 -0
- {ironflock-1.0.6 → ironflock-1.0.8}/pyproject.toml +0 -0
- {ironflock-1.0.6 → ironflock-1.0.8}/requirements.txt +0 -0
- {ironflock-1.0.6 → ironflock-1.0.8}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ironflock
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.8
|
|
4
4
|
Summary: SDK to integrate your IronFlock Industry 4 Apps with the IronFlock Data Infrastructure
|
|
5
5
|
Home-page: https://github.com/RecordEvolution/ironflock-py
|
|
6
6
|
Author: Record Evolution GmbH
|
|
@@ -84,7 +84,7 @@ pip install --upgrade setuptools wheel twine
|
|
|
84
84
|
Build and publish a new pypi package:
|
|
85
85
|
|
|
86
86
|
```shell
|
|
87
|
-
|
|
87
|
+
just publish
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
Check the package at https://pypi.org/project/ironflock/.
|
|
@@ -39,6 +39,7 @@ class IronFlock:
|
|
|
39
39
|
self._component = create_application_component(serial_number)
|
|
40
40
|
self._session: ISession = None
|
|
41
41
|
self.mainFunc = mainFunc
|
|
42
|
+
self._main_task = None
|
|
42
43
|
|
|
43
44
|
@self._component.on_join
|
|
44
45
|
async def onJoin(session, details):
|
|
@@ -136,13 +137,38 @@ class IronFlock:
|
|
|
136
137
|
app_key = os.environ.get("APP_KEY")
|
|
137
138
|
env_value = os.environ.get("ENV")
|
|
138
139
|
|
|
139
|
-
|
|
140
|
+
full_topic = f"{swarm_key}.{self._device_key}.{app_key}.{env_value}.{topic}"
|
|
140
141
|
|
|
141
142
|
if self._session is not None:
|
|
142
|
-
await self._session.register(
|
|
143
|
+
await self._session.register(func, full_topic, options=RegisterOptions(force_reregister=True))
|
|
143
144
|
else:
|
|
144
145
|
print("cannot register function, not connected")
|
|
145
146
|
|
|
147
|
+
async def call(self, device_key, topic, args, kwargs):
|
|
148
|
+
"""Calls a remote procedure on the IronFlock platform.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
device_key (str): The key of the device to call the procedure on.
|
|
152
|
+
topic (str): The URI of the topic to call, e.g. "com.myprocedure".
|
|
153
|
+
args (list): The arguments to pass to the procedure.
|
|
154
|
+
kwargs (dict): The keyword arguments to pass to the procedure.
|
|
155
|
+
|
|
156
|
+
Returns:
|
|
157
|
+
The result of the remote procedure call.
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
swarm_key = os.environ.get("SWARM_KEY")
|
|
161
|
+
app_key = os.environ.get("APP_KEY")
|
|
162
|
+
env_value = os.environ.get("ENV")
|
|
163
|
+
|
|
164
|
+
full_topic = f"{swarm_key}.{device_key}.{app_key}.{env_value}.{topic}"
|
|
165
|
+
|
|
166
|
+
if self._session is not None:
|
|
167
|
+
return await self._session.call(full_topic, *args, **kwargs)
|
|
168
|
+
else:
|
|
169
|
+
print("cannot call, not connected")
|
|
170
|
+
return None
|
|
171
|
+
|
|
146
172
|
async def publish_to_table(
|
|
147
173
|
self, tablename: str, *args, **kwargs
|
|
148
174
|
) -> Optional[Publication]:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ironflock
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.8
|
|
4
4
|
Summary: SDK to integrate your IronFlock Industry 4 Apps with the IronFlock Data Infrastructure
|
|
5
5
|
Home-page: https://github.com/RecordEvolution/ironflock-py
|
|
6
6
|
Author: Record Evolution GmbH
|
|
@@ -84,7 +84,7 @@ pip install --upgrade setuptools wheel twine
|
|
|
84
84
|
Build and publish a new pypi package:
|
|
85
85
|
|
|
86
86
|
```shell
|
|
87
|
-
|
|
87
|
+
just publish
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
Check the package at https://pypi.org/project/ironflock/.
|
|
@@ -10,7 +10,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
10
10
|
|
|
11
11
|
setup(
|
|
12
12
|
name="ironflock",
|
|
13
|
-
version="1.0.
|
|
13
|
+
version="1.0.8",
|
|
14
14
|
description="SDK to integrate your IronFlock Industry 4 Apps with the IronFlock Data Infrastructure",
|
|
15
15
|
long_description=long_description,
|
|
16
16
|
long_description_content_type="text/markdown",
|
|
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
|
|
File without changes
|