edgeberry 0.0.1__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,41 @@
1
+ Metadata-Version: 2.1
2
+ Name: edgeberry
3
+ Version: 0.0.1
4
+ Summary: Python SDK for interfacing applications with Edgeberry
5
+ Home-page: https://github.com/Edgeberry/Edgeberry-Python-SDK
6
+ Author: Sanne 'SpuQ' Santens
7
+ Author-email: sanne.santens@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.6
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: pydbus
14
+
15
+ ![Edgeberry Banner](https://raw.githubusercontent.com/Edgeberry/.github/main/brand/EdgeBerry_banner_device_software.png)
16
+
17
+ The **Edgeberry Python SDK** lorem ipsum ...
18
+
19
+ ## Usage
20
+ ```python
21
+ from edgeberry import Edgeberry
22
+ edgeberry = Edgeberry()
23
+ ```
24
+ Methods
25
+ ```python
26
+ edgeberry.set_status("level", "message")
27
+ edgeberry.set_application_info("name", "version", "description")
28
+ ```
29
+
30
+
31
+ ## License & Collaboration
32
+ **Copyright© 2024 Sanne 'SpuQ' Santens**. The Edgeberry Device Software is licensed under the **MIT License**. The [Rules & Guidelines](https://github.com/Edgeberry/.github/blob/main/brand/Edgeberry_Trademark_Rules_and_Guidelines.md) apply to the usage of the Edgeberry™ brand.
33
+
34
+ ### Collaboration
35
+
36
+ If you'd like to contribute to this project, please follow these guidelines:
37
+ 1. Fork the repository and create your branch from `main`.
38
+ 2. Make your changes and ensure they adhere to the project's coding style and conventions.
39
+ 3. Test your changes thoroughly.
40
+ 4. Ensure your commits are descriptive and well-documented.
41
+ 5. Open a pull request, describing the changes you've made and the problem or feature they address.
@@ -0,0 +1,27 @@
1
+ ![Edgeberry Banner](https://raw.githubusercontent.com/Edgeberry/.github/main/brand/EdgeBerry_banner_device_software.png)
2
+
3
+ The **Edgeberry Python SDK** lorem ipsum ...
4
+
5
+ ## Usage
6
+ ```python
7
+ from edgeberry import Edgeberry
8
+ edgeberry = Edgeberry()
9
+ ```
10
+ Methods
11
+ ```python
12
+ edgeberry.set_status("level", "message")
13
+ edgeberry.set_application_info("name", "version", "description")
14
+ ```
15
+
16
+
17
+ ## License & Collaboration
18
+ **Copyright© 2024 Sanne 'SpuQ' Santens**. The Edgeberry Device Software is licensed under the **MIT License**. The [Rules & Guidelines](https://github.com/Edgeberry/.github/blob/main/brand/Edgeberry_Trademark_Rules_and_Guidelines.md) apply to the usage of the Edgeberry™ brand.
19
+
20
+ ### Collaboration
21
+
22
+ If you'd like to contribute to this project, please follow these guidelines:
23
+ 1. Fork the repository and create your branch from `main`.
24
+ 2. Make your changes and ensure they adhere to the project's coding style and conventions.
25
+ 3. Test your changes thoroughly.
26
+ 4. Ensure your commits are descriptive and well-documented.
27
+ 5. Open a pull request, describing the changes you've made and the problem or feature they address.
@@ -0,0 +1 @@
1
+ from .edgeberry import Edgeberry
@@ -0,0 +1,63 @@
1
+ """
2
+ edgeberry.py
3
+ Core functionality for Edgeberry device.
4
+ """
5
+
6
+ import json
7
+ from pydbus import SystemBus # D-Bus System bus
8
+
9
+ # Edgeberry Core D-Bus
10
+ EDGEBERRY_SERVICE = "io.edgeberry.Core"
11
+ EDGEBERRY_OBJECT = "io/edgeberry/Core"
12
+ EDGEBERRY_INTERFACE = "io.edgeberry.Core"
13
+
14
+ class Edgeberry:
15
+ def __init__(self):
16
+ try:
17
+ # Connect to the D-Bus system bus
18
+ self.bus = SystemBus()
19
+ # Connect to the Edgeberry Core service
20
+ self.edgeberry_core_service = self.bus.get(EDGEBERRY_SERVICE)
21
+ except Exception as e:
22
+ print(f"Edgeberry: error connecting to Edgeberry D-Bus: {e}")
23
+ return None
24
+
25
+ # Set application info
26
+ def set_application_info(self, name, version, description):
27
+ try:
28
+ # Create dictionary
29
+ application_info = {
30
+ "name": name,
31
+ "version": version,
32
+ "description": description
33
+ }
34
+
35
+ # Convert dictionary to JSON string
36
+ application_info_json = json.dumps(application_info)
37
+
38
+ # Call the 'SetApplicationStatus' method on the Edgeberry Core service object
39
+ return self.edgeberry_core_service.SetApplicationStatus(application_info_json)
40
+
41
+ except Exception as e:
42
+ # Print the error message
43
+ print(f"Edgeberry: error setting status: {e}")
44
+ return None
45
+
46
+ def set_status(self, level, message):
47
+ try:
48
+ # Create dictionary
49
+ status = {
50
+ "level": level,
51
+ "message": message
52
+ }
53
+
54
+ # Convert dictionary to JSON string
55
+ status_json = json.dumps(status)
56
+
57
+ # Call the 'SetApplicationStatus' method on the Edgeberry Core service object
58
+ return self.edgeberry_core_service.SetApplicationStatus(status_json)
59
+ except Exception as e:
60
+ # Print the error message
61
+ print(f"Edgeberry: error setting status: {e}")
62
+ return None
63
+
@@ -0,0 +1,41 @@
1
+ Metadata-Version: 2.1
2
+ Name: edgeberry
3
+ Version: 0.0.1
4
+ Summary: Python SDK for interfacing applications with Edgeberry
5
+ Home-page: https://github.com/Edgeberry/Edgeberry-Python-SDK
6
+ Author: Sanne 'SpuQ' Santens
7
+ Author-email: sanne.santens@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.6
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: pydbus
14
+
15
+ ![Edgeberry Banner](https://raw.githubusercontent.com/Edgeberry/.github/main/brand/EdgeBerry_banner_device_software.png)
16
+
17
+ The **Edgeberry Python SDK** lorem ipsum ...
18
+
19
+ ## Usage
20
+ ```python
21
+ from edgeberry import Edgeberry
22
+ edgeberry = Edgeberry()
23
+ ```
24
+ Methods
25
+ ```python
26
+ edgeberry.set_status("level", "message")
27
+ edgeberry.set_application_info("name", "version", "description")
28
+ ```
29
+
30
+
31
+ ## License & Collaboration
32
+ **Copyright© 2024 Sanne 'SpuQ' Santens**. The Edgeberry Device Software is licensed under the **MIT License**. The [Rules & Guidelines](https://github.com/Edgeberry/.github/blob/main/brand/Edgeberry_Trademark_Rules_and_Guidelines.md) apply to the usage of the Edgeberry™ brand.
33
+
34
+ ### Collaboration
35
+
36
+ If you'd like to contribute to this project, please follow these guidelines:
37
+ 1. Fork the repository and create your branch from `main`.
38
+ 2. Make your changes and ensure they adhere to the project's coding style and conventions.
39
+ 3. Test your changes thoroughly.
40
+ 4. Ensure your commits are descriptive and well-documented.
41
+ 5. Open a pull request, describing the changes you've made and the problem or feature they address.
@@ -0,0 +1,9 @@
1
+ README.md
2
+ setup.py
3
+ edgeberry/__init__.py
4
+ edgeberry/edgeberry.py
5
+ edgeberry.egg-info/PKG-INFO
6
+ edgeberry.egg-info/SOURCES.txt
7
+ edgeberry.egg-info/dependency_links.txt
8
+ edgeberry.egg-info/requires.txt
9
+ edgeberry.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ pydbus
@@ -0,0 +1 @@
1
+ edgeberry
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,22 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="edgeberry",
5
+ version="0.0.1",
6
+ author="Sanne 'SpuQ' Santens",
7
+ author_email="sanne.santens@gmail.com",
8
+ description="Python SDK for interfacing applications with Edgeberry",
9
+ long_description=open("README.md").read(),
10
+ long_description_content_type="text/markdown",
11
+ url="https://github.com/Edgeberry/Edgeberry-Python-SDK",
12
+ packages=find_packages(),
13
+ install_requires=[
14
+ "pydbus", # List dependencies here
15
+ ],
16
+ classifiers=[
17
+ "Programming Language :: Python :: 3",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Operating System :: OS Independent",
20
+ ],
21
+ python_requires='>=3.6',
22
+ )