ironflock 1.0.9__tar.gz → 1.1.0__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.
@@ -0,0 +1,4 @@
1
+ include MANIFEST.in
2
+ include *.cfg
3
+ include *.ini
4
+ include *.txt
@@ -1,25 +1,24 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ironflock
3
- Version: 1.0.9
3
+ Version: 1.1.0
4
4
  Summary: SDK to integrate your IronFlock Industry 4 Apps with the IronFlock Data Infrastructure
5
- Home-page: https://github.com/RecordEvolution/ironflock-py
6
- Author: Record Evolution GmbH
7
- Author-email: marko.petzold@record-evolution.de
8
- License: MIT
5
+ Author-email: Record Evolution GmbH <marko.petzold@record-evolution.de>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/RecordEvolution/ironflock-py
8
+ Project-URL: Repository, https://github.com/RecordEvolution/ironflock-py
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
9
17
  Requires-Python: >=3.8
10
18
  Description-Content-Type: text/markdown
11
19
  License-File: LICENSE
12
- Requires-Dist: autobahn[asyncio,serialization]==22.3.2
13
- Dynamic: author
14
- Dynamic: author-email
15
- Dynamic: description
16
- Dynamic: description-content-type
17
- Dynamic: home-page
18
- Dynamic: license
20
+ Requires-Dist: autobahn[asyncio,serialization]==24.4.2
19
21
  Dynamic: license-file
20
- Dynamic: requires-dist
21
- Dynamic: requires-python
22
- Dynamic: summary
23
22
 
24
23
  # ironflock
25
24
 
@@ -32,6 +31,19 @@ of the device's fleet and the data is collected in the respective fleet database
32
31
  So if you use the library in your app, the data collection will always be private to the app user's fleet.
33
32
 
34
33
  For more information on the IronFlock IoT Devops Platform for engineers and developers visit our [IronFlock](https://www.ironflock.com) home page.
34
+
35
+ ## Requirements
36
+
37
+ - Python 3.8 or higher
38
+ - Compatible with Python 3.8, 3.9, 3.10, 3.11, and 3.12
39
+
40
+ ## Installation
41
+
42
+ Install from PyPI:
43
+
44
+ ```shell
45
+ pip install ironflock
46
+ ```
35
47
  ## Usage
36
48
 
37
49
  ```python
@@ -75,10 +87,10 @@ the [examples](https://github.com/RecordEvolution/ironflock-py/tree/main/example
75
87
 
76
88
  ## Development
77
89
 
78
- Install the necessary components if you don't have them already:
90
+ Install the necessary build tools if you don't have them already:
79
91
 
80
92
  ```shell
81
- pip install --upgrade setuptools wheel twine
93
+ pip install --upgrade build twine
82
94
  ```
83
95
 
84
96
  Build and publish a new pypi package:
@@ -87,4 +99,17 @@ Build and publish a new pypi package:
87
99
  just publish
88
100
  ```
89
101
 
102
+ Alternatively, you can build manually:
103
+
104
+ ```shell
105
+ # Clean previous builds
106
+ rm -rf build dist *.egg-info
107
+
108
+ # Build the package
109
+ python -m build
110
+
111
+ # Upload to PyPI
112
+ twine upload dist/*
113
+ ```
114
+
90
115
  Check the package at https://pypi.org/project/ironflock/.
@@ -9,6 +9,19 @@ of the device's fleet and the data is collected in the respective fleet database
9
9
  So if you use the library in your app, the data collection will always be private to the app user's fleet.
10
10
 
11
11
  For more information on the IronFlock IoT Devops Platform for engineers and developers visit our [IronFlock](https://www.ironflock.com) home page.
12
+
13
+ ## Requirements
14
+
15
+ - Python 3.8 or higher
16
+ - Compatible with Python 3.8, 3.9, 3.10, 3.11, and 3.12
17
+
18
+ ## Installation
19
+
20
+ Install from PyPI:
21
+
22
+ ```shell
23
+ pip install ironflock
24
+ ```
12
25
  ## Usage
13
26
 
14
27
  ```python
@@ -52,10 +65,10 @@ the [examples](https://github.com/RecordEvolution/ironflock-py/tree/main/example
52
65
 
53
66
  ## Development
54
67
 
55
- Install the necessary components if you don't have them already:
68
+ Install the necessary build tools if you don't have them already:
56
69
 
57
70
  ```shell
58
- pip install --upgrade setuptools wheel twine
71
+ pip install --upgrade build twine
59
72
  ```
60
73
 
61
74
  Build and publish a new pypi package:
@@ -64,4 +77,17 @@ Build and publish a new pypi package:
64
77
  just publish
65
78
  ```
66
79
 
80
+ Alternatively, you can build manually:
81
+
82
+ ```shell
83
+ # Clean previous builds
84
+ rm -rf build dist *.egg-info
85
+
86
+ # Build the package
87
+ python -m build
88
+
89
+ # Upload to PyPI
90
+ twine upload dist/*
91
+ ```
92
+
67
93
  Check the package at https://pypi.org/project/ironflock/.
@@ -0,0 +1,32 @@
1
+ ###
2
+ # Minimal example of creating an Autobahn asyncio ApplicationSession
3
+ # for connecting to the IronFlock Platform.
4
+ # Compared to the IronFlock() class, the ApplicationSession approach allows
5
+ # more control reacting to the lifecycle of the Session:
6
+ # you can register callback functions like on_join or on_leave.
7
+ # For more details checkout:
8
+ # https://autobahn.readthedocs.io/en/latest/wamp/programming.html#application-components
9
+ ###
10
+
11
+ from asyncio import sleep
12
+ from autobahn.wamp.interfaces import ISession
13
+ from ironflock import create_application_session
14
+
15
+ # returns an Autobahn asyncio ApplicationSession and ApplicationRunner, for more information checkout:
16
+ # https://autobahn.readthedocs.io/en/latest/reference/autobahn.asyncio.html
17
+ AppSession, runner = create_application_session()
18
+
19
+
20
+ class Application(AppSession):
21
+ async def onJoin(session: ISession, details):
22
+ print("joined router")
23
+ print(session, details)
24
+
25
+ # publish an event every second
26
+ while True:
27
+ session.publish("test.publish.com", 1, "two", 3, foo="bar")
28
+ await sleep(1)
29
+
30
+
31
+ if __name__ == "__main__":
32
+ runner.run(Application)
@@ -0,0 +1,40 @@
1
+ ###
2
+ # Minimal example of creating an Autobahn asyncio Component
3
+ # for connecting to the IronFlock Platform.
4
+ # Compared to the IronFlock() class, the Component approach allows
5
+ # more control, e.g. reacting to the lifecycle of the component:
6
+ # you can register callback functions like on_join or on_leave.
7
+ # For more details checkout:
8
+ # https://autobahn.readthedocs.io/en/latest/wamp/programming.html#application-components
9
+ ###
10
+
11
+ from asyncio import sleep
12
+ from autobahn.asyncio.component import run
13
+ from autobahn.wamp.interfaces import ISession
14
+ from ironflock import create_application_component
15
+
16
+ # returns an Autobahn asyncio Component, for more information checkout:
17
+ # https://autobahn.readthedocs.io/en/latest/reference/autobahn.asyncio.html
18
+ comp = create_application_component()
19
+
20
+
21
+ @comp.on_join
22
+ async def onJoin(session: ISession, details):
23
+ print("joined router")
24
+ print(session, details)
25
+
26
+ def handler(*args, **kwargs):
27
+ print("got event")
28
+ print(args, kwargs)
29
+
30
+ # subscribe to a topic
31
+ session.subscribe(handler, "test.publish.com")
32
+
33
+ # publish an event every second
34
+ while True:
35
+ session.publish("test.publish.com", 1, "two", 3, foo="bar")
36
+ await sleep(1)
37
+
38
+
39
+ if __name__ == "__main__":
40
+ run([comp])
@@ -0,0 +1,25 @@
1
+ ###
2
+ # Minimal example of publishing events to the IronFlock Platform.
3
+ ###
4
+
5
+ import asyncio
6
+ from ironflock import IronFlock
7
+
8
+ # create a ironflock instance, which auto connects to the IronFlock Platform
9
+ # the ironflock instance handles authentication and reconnects when connection is lost
10
+ rw = IronFlock()
11
+
12
+
13
+ async def main():
14
+ while True:
15
+ # publish an event (if connection is not established the publish is skipped)
16
+ publication = await rw.publish("test.publish.com", 1, "two", 3, foo="bar")
17
+ print(publication)
18
+ await asyncio.sleep(3)
19
+
20
+
21
+ if __name__ == "__main__":
22
+ # run the main coroutine
23
+ asyncio.get_event_loop().create_task(main())
24
+ # run the ironflock component
25
+ rw.run()
@@ -0,0 +1,29 @@
1
+ ###
2
+ # Minimal example of publishing events to the IronFlock Platform.
3
+ ###
4
+
5
+ import asyncio
6
+ from datetime import datetime
7
+ from ironflock import IronFlock
8
+
9
+ # create a ironflock instance, which auto connects to the IronFlock Platform
10
+ # the ironflock instance handles authentication and reconnects when connection is lost
11
+ rw = IronFlock()
12
+
13
+
14
+ async def main():
15
+ while True:
16
+ # publish an event (if connection is not established the publish is skipped)
17
+ publication = await rw.publish_to_table(
18
+ "sensordata",
19
+ dict(temperature=25, tsp=datetime.now().astimezone().isoformat()),
20
+ )
21
+ print(publication)
22
+ await asyncio.sleep(3)
23
+
24
+
25
+ if __name__ == "__main__":
26
+ # run the main coroutine
27
+ asyncio.get_event_loop().create_task(main())
28
+ # run the ironflock component
29
+ rw.run()
@@ -1,25 +1,24 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ironflock
3
- Version: 1.0.9
3
+ Version: 1.1.0
4
4
  Summary: SDK to integrate your IronFlock Industry 4 Apps with the IronFlock Data Infrastructure
5
- Home-page: https://github.com/RecordEvolution/ironflock-py
6
- Author: Record Evolution GmbH
7
- Author-email: marko.petzold@record-evolution.de
8
- License: MIT
5
+ Author-email: Record Evolution GmbH <marko.petzold@record-evolution.de>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/RecordEvolution/ironflock-py
8
+ Project-URL: Repository, https://github.com/RecordEvolution/ironflock-py
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
9
17
  Requires-Python: >=3.8
10
18
  Description-Content-Type: text/markdown
11
19
  License-File: LICENSE
12
- Requires-Dist: autobahn[asyncio,serialization]==22.3.2
13
- Dynamic: author
14
- Dynamic: author-email
15
- Dynamic: description
16
- Dynamic: description-content-type
17
- Dynamic: home-page
18
- Dynamic: license
20
+ Requires-Dist: autobahn[asyncio,serialization]==24.4.2
19
21
  Dynamic: license-file
20
- Dynamic: requires-dist
21
- Dynamic: requires-python
22
- Dynamic: summary
23
22
 
24
23
  # ironflock
25
24
 
@@ -32,6 +31,19 @@ of the device's fleet and the data is collected in the respective fleet database
32
31
  So if you use the library in your app, the data collection will always be private to the app user's fleet.
33
32
 
34
33
  For more information on the IronFlock IoT Devops Platform for engineers and developers visit our [IronFlock](https://www.ironflock.com) home page.
34
+
35
+ ## Requirements
36
+
37
+ - Python 3.8 or higher
38
+ - Compatible with Python 3.8, 3.9, 3.10, 3.11, and 3.12
39
+
40
+ ## Installation
41
+
42
+ Install from PyPI:
43
+
44
+ ```shell
45
+ pip install ironflock
46
+ ```
35
47
  ## Usage
36
48
 
37
49
  ```python
@@ -75,10 +87,10 @@ the [examples](https://github.com/RecordEvolution/ironflock-py/tree/main/example
75
87
 
76
88
  ## Development
77
89
 
78
- Install the necessary components if you don't have them already:
90
+ Install the necessary build tools if you don't have them already:
79
91
 
80
92
  ```shell
81
- pip install --upgrade setuptools wheel twine
93
+ pip install --upgrade build twine
82
94
  ```
83
95
 
84
96
  Build and publish a new pypi package:
@@ -87,4 +99,17 @@ Build and publish a new pypi package:
87
99
  just publish
88
100
  ```
89
101
 
102
+ Alternatively, you can build manually:
103
+
104
+ ```shell
105
+ # Clean previous builds
106
+ rm -rf build dist *.egg-info
107
+
108
+ # Build the package
109
+ python -m build
110
+
111
+ # Upload to PyPI
112
+ twine upload dist/*
113
+ ```
114
+
90
115
  Check the package at https://pypi.org/project/ironflock/.
@@ -2,8 +2,10 @@ LICENSE
2
2
  MANIFEST.in
3
3
  README.md
4
4
  pyproject.toml
5
- requirements.txt
6
- setup.py
5
+ examples/app_session.py
6
+ examples/component.py
7
+ examples/simple_publish.py
8
+ examples/table_publish.py
7
9
  ironflock/AutobahnConnection.py
8
10
  ironflock/__init__.py
9
11
  ironflock/ironflock.py
@@ -11,4 +13,5 @@ ironflock.egg-info/PKG-INFO
11
13
  ironflock.egg-info/SOURCES.txt
12
14
  ironflock.egg-info/dependency_links.txt
13
15
  ironflock.egg-info/requires.txt
14
- ironflock.egg-info/top_level.txt
16
+ ironflock.egg-info/top_level.txt
17
+ test/main.py
@@ -0,0 +1 @@
1
+ autobahn[asyncio,serialization]==24.4.2
@@ -0,0 +1,4 @@
1
+ dist
2
+ examples
3
+ ironflock
4
+ test
@@ -0,0 +1,37 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools>=42",
4
+ "wheel"
5
+ ]
6
+ build-backend = "setuptools.build_meta"
7
+
8
+ [project]
9
+ name = "ironflock"
10
+ version = "1.1.0"
11
+ description = "SDK to integrate your IronFlock Industry 4 Apps with the IronFlock Data Infrastructure"
12
+ readme = "README.md"
13
+ license = "MIT"
14
+ authors = [
15
+ {name = "Record Evolution GmbH", email = "marko.petzold@record-evolution.de"}
16
+ ]
17
+ requires-python = ">=3.8"
18
+ dependencies = [
19
+ "autobahn[asyncio,serialization]==24.4.2"
20
+ ]
21
+ classifiers = [
22
+ "Development Status :: 5 - Production/Stable",
23
+ "Intended Audience :: Developers",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.8",
26
+ "Programming Language :: Python :: 3.9",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ ]
31
+
32
+ [project.urls]
33
+ Homepage = "https://github.com/RecordEvolution/ironflock-py"
34
+ Repository = "https://github.com/RecordEvolution/ironflock-py"
35
+
36
+ [tool.setuptools.packages.find]
37
+ # Automatically find packages
@@ -0,0 +1,10 @@
1
+ from asyncio.events import get_event_loop
2
+ from ironflock import IronFlock
3
+
4
+ async def main():
5
+ rw = IronFlock(serial_number="7652ee0b-c2cb-466a-b8ee-fec4167bf7ce")
6
+ result = await rw.publish('re.meetup.data', {"temperature": 20})
7
+ print(result)
8
+
9
+ if __name__ == "__main__":
10
+ get_event_loop().run_until_complete(main())
@@ -1,6 +0,0 @@
1
- include MANIFEST.in
2
- include setup.py
3
- include *.cfg
4
- include *.ini
5
- include *.txt
6
- include requirements.txt
@@ -1 +0,0 @@
1
- autobahn[asyncio,serialization]==22.3.2
@@ -1 +0,0 @@
1
- ironflock
@@ -1,6 +0,0 @@
1
- [build-system]
2
- requires = [
3
- "setuptools>=42",
4
- "wheel"
5
- ]
6
- build-backend = "setuptools.build_meta"
@@ -1 +0,0 @@
1
- autobahn[asyncio, serialization]==22.3.2
ironflock-1.0.9/setup.py DELETED
@@ -1,25 +0,0 @@
1
- from setuptools import setup, find_packages
2
-
3
- requirements = []
4
- with open("requirements.txt", "r") as fh:
5
- for line in fh:
6
- requirements.append(line.strip())
7
-
8
- with open("README.md", "r", encoding="utf-8") as fh:
9
- long_description = fh.read()
10
-
11
- setup(
12
- name="ironflock",
13
- version="1.0.9",
14
- description="SDK to integrate your IronFlock Industry 4 Apps with the IronFlock Data Infrastructure",
15
- long_description=long_description,
16
- long_description_content_type="text/markdown",
17
- url="https://github.com/RecordEvolution/ironflock-py",
18
- author="Record Evolution GmbH",
19
- author_email="marko.petzold@record-evolution.de",
20
- packages=find_packages(),
21
- license="MIT",
22
- python_requires=">=3.8",
23
- install_requires=requirements,
24
- classifiers=[],
25
- )
File without changes
File without changes