python-pironman 0.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.
Files changed (30) hide show
  1. python_pironman-0.1.0/.github/workflows/release.yml +91 -0
  2. python_pironman-0.1.0/.github/workflows/tests.yml +46 -0
  3. python_pironman-0.1.0/.gitignore +12 -0
  4. python_pironman-0.1.0/CHANGELOG.md +26 -0
  5. python_pironman-0.1.0/CONTRIBUTING.md +19 -0
  6. python_pironman-0.1.0/LICENSE +21 -0
  7. python_pironman-0.1.0/PKG-INFO +101 -0
  8. python_pironman-0.1.0/README.md +76 -0
  9. python_pironman-0.1.0/SECURITY.md +25 -0
  10. python_pironman-0.1.0/docs/architecture.md +38 -0
  11. python_pironman-0.1.0/docs/device-identity.md +53 -0
  12. python_pironman-0.1.0/docs/hardware-validation.md +25 -0
  13. python_pironman-0.1.0/docs/releasing.md +58 -0
  14. python_pironman-0.1.0/examples/read_device.py +47 -0
  15. python_pironman-0.1.0/examples/read_metadata.py +45 -0
  16. python_pironman-0.1.0/pyproject.toml +58 -0
  17. python_pironman-0.1.0/src/pironman/__init__.py +21 -0
  18. python_pironman-0.1.0/src/pironman/client.py +120 -0
  19. python_pironman-0.1.0/src/pironman/const.py +5 -0
  20. python_pironman-0.1.0/src/pironman/device.py +65 -0
  21. python_pironman-0.1.0/src/pironman/exceptions.py +21 -0
  22. python_pironman-0.1.0/src/pironman/models.py +64 -0
  23. python_pironman-0.1.0/src/pironman/py.typed +0 -0
  24. python_pironman-0.1.0/tests/__init__.py +0 -0
  25. python_pironman-0.1.0/tests/http_mock.py +77 -0
  26. python_pironman-0.1.0/tests/test_client.py +241 -0
  27. python_pironman-0.1.0/tests/test_device.py +195 -0
  28. python_pironman-0.1.0/tests/test_distribution.py +17 -0
  29. python_pironman-0.1.0/tests/test_http_integration.py +70 -0
  30. python_pironman-0.1.0/tests/test_package.py +8 -0
@@ -0,0 +1,91 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ publish:
7
+ description: Publish to production PyPI
8
+ required: true
9
+ default: false
10
+ type: boolean
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ concurrency:
16
+ group: release
17
+ cancel-in-progress: false
18
+
19
+ jobs:
20
+ build:
21
+ if: github.ref == 'refs/heads/main'
22
+ runs-on: ubuntu-latest
23
+
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+
27
+ - uses: actions/setup-python@v5
28
+ with:
29
+ python-version: "3.13"
30
+
31
+ - name: Install development dependencies
32
+ run: |
33
+ python -m pip install --upgrade pip
34
+ python -m pip install -e ".[test]"
35
+
36
+ - name: Lint
37
+ run: ruff check .
38
+
39
+ - name: Formatting
40
+ run: ruff format --check .
41
+
42
+ - name: Type checking
43
+ run: mypy src
44
+
45
+ - name: Tests
46
+ run: |
47
+ pytest --cov=pironman --cov-fail-under=100
48
+
49
+ - name: Build distribution
50
+ run: python -m build
51
+
52
+ - name: Validate distribution
53
+ run: twine check dist/*
54
+
55
+ - name: Test installed wheel
56
+ run: |
57
+ python -m venv "$RUNNER_TEMP/wheel-test"
58
+ PY="$RUNNER_TEMP/wheel-test/bin/python"
59
+ "$PY" -m pip install dist/*.whl
60
+ cd "$RUNNER_TEMP"
61
+ "$PY" -c "from pironman import PironmanClient, PironmanDeviceInfo"
62
+ "$PY" -c "from importlib.metadata import version; print(version('python-pironman'))"
63
+
64
+ - name: Upload distributions
65
+ uses: actions/upload-artifact@v4
66
+ with:
67
+ name: python-distributions
68
+ path: dist/
69
+ if-no-files-found: error
70
+
71
+ publish:
72
+ if: inputs.publish == true
73
+ needs: build
74
+ runs-on: ubuntu-latest
75
+
76
+ environment:
77
+ name: pypi
78
+ url: https://pypi.org/project/python-pironman/
79
+
80
+ permissions:
81
+ id-token: write
82
+
83
+ steps:
84
+ - name: Download distributions
85
+ uses: actions/download-artifact@v4
86
+ with:
87
+ name: python-distributions
88
+ path: dist/
89
+
90
+ - name: Publish to PyPI
91
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,46 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ matrix:
16
+ python-version: ["3.12", "3.13", "3.14"]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+
25
+ - name: Install package
26
+ run: |
27
+ python -m pip install --upgrade pip
28
+ python -m pip install -e ".[test]"
29
+
30
+ - name: Lint
31
+ run: ruff check .
32
+
33
+ - name: Formatting
34
+ run: ruff format --check .
35
+
36
+ - name: Type checking
37
+ run: mypy src
38
+
39
+ - name: Tests
40
+ run: pytest --cov=pironman --cov-report=term-missing --cov-fail-under=100
41
+
42
+ - name: Build distribution
43
+ run: python -m build
44
+
45
+ - name: Validate distribution
46
+ run: twine check dist/*
@@ -0,0 +1,12 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ .venv/
5
+ .pytest_cache/
6
+ .ruff_cache/
7
+ .mypy_cache/
8
+ .coverage
9
+ htmlcov/
10
+ build/
11
+ dist/
12
+ .env
@@ -0,0 +1,26 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - Initialize standalone Python package.
6
+ - Add CI, packaging and development tooling.
7
+ - Document API architecture and source provenance.
8
+
9
+ - Add asynchronous read-only REST API client.
10
+ - Add structured API and connection exceptions.
11
+ - Support externally managed aiohttp sessions.
12
+ - Support IPv4, IPv6 and custom API ports.
13
+ - Add endpoint and failure-handling tests.
14
+ - Add read-only hardware validation example.
15
+
16
+ - Add typed device identity and capability metadata.
17
+ - Extract existing Pironman model detection.
18
+ - Accept optional upstream device UID.
19
+ - Distinguish unknown from unsupported capabilities.
20
+ - Add model and identity validation tests.
21
+
22
+ - Prepare initial public release.
23
+ - Add GitHub Trusted Publishing workflow.
24
+ - Validate installed wheel and package metadata.
25
+ - Require complete statement coverage in CI.
26
+ - Add release documentation and security policy.
@@ -0,0 +1,19 @@
1
+ # Contributing
2
+
3
+ Create a virtual environment and install development dependencies:
4
+
5
+ python -m venv .venv
6
+ source .venv/bin/activate
7
+ pip install -e ".[test]"
8
+
9
+ Run checks before submitting changes:
10
+
11
+ ruff check .
12
+ ruff format --check .
13
+ mypy src
14
+ pytest
15
+ python -m build
16
+ twine check dist/*
17
+
18
+ Do not commit real device identifiers, IP addresses,
19
+ credentials or unsanitized hardware API responses.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Christoph Komenda
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,101 @@
1
+ Metadata-Version: 2.5
2
+ Name: python-pironman
3
+ Version: 0.1.0
4
+ Summary: Async Python client for the SunFounder Pironman REST API
5
+ Project-URL: Repository, https://github.com/ChristophKomenda/python-pironman
6
+ Project-URL: Issues, https://github.com/ChristophKomenda/python-pironman/issues
7
+ Author: Christoph Komenda
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 2 - Pre-Alpha
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Typing :: Typed
13
+ Requires-Python: >=3.12
14
+ Requires-Dist: aiohttp<4,>=3.10
15
+ Requires-Dist: yarl<2,>=1.12
16
+ Provides-Extra: test
17
+ Requires-Dist: build; extra == 'test'
18
+ Requires-Dist: mypy; extra == 'test'
19
+ Requires-Dist: pytest; extra == 'test'
20
+ Requires-Dist: pytest-asyncio; extra == 'test'
21
+ Requires-Dist: pytest-cov; extra == 'test'
22
+ Requires-Dist: ruff; extra == 'test'
23
+ Requires-Dist: twine; extra == 'test'
24
+ Description-Content-Type: text/markdown
25
+
26
+ # Python Pironman
27
+
28
+ An independent asynchronous Python library for the local
29
+ SunFounder Pironman hardware REST API.
30
+
31
+ ## Project goals
32
+
33
+ - Asynchronous HTTP communication using aiohttp.
34
+ - Typed device metadata and hardware capabilities.
35
+ - Read-only monitoring as the initial implementation.
36
+ - Support for externally managed HTTP sessions.
37
+ - Consistent API error handling.
38
+ - Automated tests and hardware validation.
39
+ - Reusable by Home Assistant and other Python applications.
40
+
41
+ ## Status
42
+
43
+ Version 0.1.0 is prepared for initial publication on PyPI.
44
+
45
+ Physical hardware validation has been completed on two Pironman 5 Max devices running API version 1.3.21.
46
+
47
+ Recognition of other Pironman models does not establish verified hardware compatibility.
48
+
49
+ This project is independently maintained and is not an
50
+ official SunFounder or Home Assistant integration.
51
+
52
+ ## Usage
53
+
54
+ Install the development package in a virtual environment:
55
+
56
+ pip install -e .
57
+
58
+ Read basic device information:
59
+
60
+ python examples/read_device.py 192.0.2.10
61
+
62
+ Replace the example address with the actual Pironman host.
63
+
64
+ The caller owns the aiohttp ClientSession.
65
+ The library never closes externally managed sessions.
66
+
67
+ ### Supported endpoints
68
+
69
+ - GET /api/v1.0/get-device-info
70
+ - GET /api/v1.0/get-data
71
+ - GET /api/v1.0/get-config
72
+ - GET /api/v1.0/get-ips
73
+
74
+ The initial implementation is read-only.
75
+ No Home Assistant dependency is required.
76
+
77
+ The network endpoint is optional on older API versions.
78
+ Persistent device identity remains pending upstream review.
79
+
80
+ ## Device identity and capabilities
81
+
82
+ Read typed device metadata using:
83
+
84
+ python examples/read_metadata.py 192.0.2.10
85
+
86
+ Persistent device UID support is optional.
87
+
88
+ Model identifiers are never used as physical device IDs.
89
+ Missing capability information is represented as unknown.
90
+
91
+ See [Device identity](docs/device-identity.md).
92
+
93
+ ## Related projects
94
+
95
+ - [Pironman HACS integration](https://github.com/ChristophKomenda/pironman5-homeassistant-container)
96
+ - [SunFounder Pironman software](https://github.com/sunfounder/pironman5)
97
+ - [Upstream device identity proposal](https://github.com/sunfounder/pironman5/pull/130)
98
+
99
+ ## License
100
+
101
+ MIT
@@ -0,0 +1,76 @@
1
+ # Python Pironman
2
+
3
+ An independent asynchronous Python library for the local
4
+ SunFounder Pironman hardware REST API.
5
+
6
+ ## Project goals
7
+
8
+ - Asynchronous HTTP communication using aiohttp.
9
+ - Typed device metadata and hardware capabilities.
10
+ - Read-only monitoring as the initial implementation.
11
+ - Support for externally managed HTTP sessions.
12
+ - Consistent API error handling.
13
+ - Automated tests and hardware validation.
14
+ - Reusable by Home Assistant and other Python applications.
15
+
16
+ ## Status
17
+
18
+ Version 0.1.0 is prepared for initial publication on PyPI.
19
+
20
+ Physical hardware validation has been completed on two Pironman 5 Max devices running API version 1.3.21.
21
+
22
+ Recognition of other Pironman models does not establish verified hardware compatibility.
23
+
24
+ This project is independently maintained and is not an
25
+ official SunFounder or Home Assistant integration.
26
+
27
+ ## Usage
28
+
29
+ Install the development package in a virtual environment:
30
+
31
+ pip install -e .
32
+
33
+ Read basic device information:
34
+
35
+ python examples/read_device.py 192.0.2.10
36
+
37
+ Replace the example address with the actual Pironman host.
38
+
39
+ The caller owns the aiohttp ClientSession.
40
+ The library never closes externally managed sessions.
41
+
42
+ ### Supported endpoints
43
+
44
+ - GET /api/v1.0/get-device-info
45
+ - GET /api/v1.0/get-data
46
+ - GET /api/v1.0/get-config
47
+ - GET /api/v1.0/get-ips
48
+
49
+ The initial implementation is read-only.
50
+ No Home Assistant dependency is required.
51
+
52
+ The network endpoint is optional on older API versions.
53
+ Persistent device identity remains pending upstream review.
54
+
55
+ ## Device identity and capabilities
56
+
57
+ Read typed device metadata using:
58
+
59
+ python examples/read_metadata.py 192.0.2.10
60
+
61
+ Persistent device UID support is optional.
62
+
63
+ Model identifiers are never used as physical device IDs.
64
+ Missing capability information is represented as unknown.
65
+
66
+ See [Device identity](docs/device-identity.md).
67
+
68
+ ## Related projects
69
+
70
+ - [Pironman HACS integration](https://github.com/ChristophKomenda/pironman5-homeassistant-container)
71
+ - [SunFounder Pironman software](https://github.com/sunfounder/pironman5)
72
+ - [Upstream device identity proposal](https://github.com/sunfounder/pironman5/pull/130)
73
+
74
+ ## License
75
+
76
+ MIT
@@ -0,0 +1,25 @@
1
+ # Security Policy
2
+
3
+ ## Reporting vulnerabilities
4
+
5
+ Please use GitHub private vulnerability reporting
6
+ when enabled for this repository.
7
+
8
+ Do not publish credentials, device identifiers or
9
+ unsanitized hardware diagnostics in public issues.
10
+
11
+ ## Network security
12
+
13
+ The Pironman REST API is intended for trusted local
14
+ networks.
15
+
16
+ Do not expose the API directly to the internet.
17
+
18
+ The library does not require cloud access or external
19
+ accounts.
20
+
21
+ ## Release security
22
+
23
+ PyPI publication uses GitHub Trusted Publishing.
24
+
25
+ No permanent PyPI API token is required.
@@ -0,0 +1,38 @@
1
+ # Architecture
2
+
3
+ ## Source provenance
4
+
5
+ Initial design based on:
6
+
7
+ - Repository: ChristophKomenda/pironman5-homeassistant-container
8
+ - Commit: acf44681bbebd797c277ef8ceb47594134d0852a
9
+
10
+ ## Separation of responsibilities
11
+
12
+ SunFounder REST API
13
+ -> Python Pironman library
14
+ -> Home Assistant HACS / Core integrations
15
+
16
+ ## Initial API scope
17
+
18
+ - GET /api/v1.0/get-device-info
19
+ - GET /api/v1.0/get-data
20
+ - GET /api/v1.0/get-config
21
+ - GET /api/v1.0/get-ips
22
+
23
+ ## Identity
24
+
25
+ Persistent device identity is pending upstream review.
26
+
27
+ The library must not invent a persistent hardware identifier
28
+ or require an API field that is not yet available.
29
+
30
+ ## HTTP sessions
31
+
32
+ The library should accept an externally managed aiohttp
33
+ ClientSession and must not close sessions it does not own.
34
+
35
+ ## Security
36
+
37
+ Local trusted-network communication only.
38
+ No cloud dependencies or automatic hardware modifications.
@@ -0,0 +1,53 @@
1
+ # Device identity and capabilities
2
+
3
+ The library separates model identification from physical
4
+ device identity.
5
+
6
+ ## Model identification
7
+
8
+ Model detection is extracted from the existing HACS
9
+ integration at source commit:
10
+
11
+ acf44681bbebd797c277ef8ceb47594134d0852a
12
+
13
+ Recognized models:
14
+
15
+ - Pironman 5
16
+ - Pironman 5 Mini
17
+ - Pironman 5 Max
18
+ - Pironman 5 Pro Max
19
+
20
+ Model recognition does not establish hardware compatibility.
21
+
22
+ ## Persistent identity
23
+
24
+ The optional device_uid field is accepted when supplied by
25
+ the vendor API.
26
+
27
+ A model ID, hostname or IP address is not a persistent
28
+ hardware identifier.
29
+
30
+ No synthetic hardware identity is generated.
31
+
32
+ The library does not independently verify UID uniqueness
33
+ or persistence.
34
+
35
+ Upstream proposal:
36
+ https://github.com/sunfounder/pironman5/pull/130
37
+
38
+ ## Capabilities
39
+
40
+ The supports method returns:
41
+
42
+ - True: explicitly supported
43
+ - False: absent from valid peripheral metadata
44
+ - None: unavailable or malformed peripheral metadata
45
+
46
+ Unknown capabilities must not automatically enable controls.
47
+
48
+ ## Backward compatibility
49
+
50
+ The existing raw REST client remains unchanged.
51
+
52
+ Typed metadata is available through
53
+ async_get_device_metadata.
@@ -0,0 +1,25 @@
1
+ # Hardware validation
2
+
3
+ Date: 2026-11-29
4
+
5
+ Two separate physical Pironman 5 Max devices were tested
6
+ using the standalone asynchronous Python client.
7
+
8
+ | Property | Device A | Device B |
9
+ |---|---|---|
10
+ | API version | 1.3.21 | 1.3.21 |
11
+ | Connection | Local | Remote LAN |
12
+ | Device metadata fields | 6 | 6 |
13
+ | Measurement fields | 36 | 47 |
14
+ | Configuration fields | 1 | 1 |
15
+ | Network endpoint | PASS | PASS |
16
+ | Persistent UID available | No | No |
17
+ | Read-only validation | PASS | PASS |
18
+
19
+ All four supported GET endpoints worked on both devices.
20
+
21
+ No hardware configuration was changed.
22
+
23
+ Persistent device identity remains pending upstream review.
24
+
25
+ Related: https://github.com/sunfounder/pironman5/pull/130
@@ -0,0 +1,58 @@
1
+ # Release process
2
+
3
+ ## Preconditions
4
+
5
+ - All CI checks successful.
6
+ - Complete statement coverage.
7
+ - Valid wheel and source distribution.
8
+ - Successful installation from the built wheel.
9
+ - Hardware validation documented.
10
+ - PyPI project name verified.
11
+ - Trusted Publisher configured.
12
+
13
+ ## PyPI Trusted Publisher
14
+
15
+ Configure a pending publisher on PyPI:
16
+
17
+ - Project: python-pironman
18
+ - Owner: ChristophKomenda
19
+ - Repository: python-pironman
20
+ - Workflow: release.yml
21
+ - Environment: pypi
22
+
23
+ Create the corresponding GitHub Actions environment.
24
+
25
+ Restrict deployments to the main branch.
26
+
27
+ Require manual approval where supported.
28
+
29
+ ## Release validation
30
+
31
+ Run the Release workflow with publish disabled.
32
+
33
+ Inspect the build, tests and distribution artifacts.
34
+
35
+ ## Publication
36
+
37
+ Run the Release workflow with publish enabled only
38
+ after successful validation and publisher configuration.
39
+
40
+ Verify installation from production PyPI.
41
+
42
+ Create the corresponding GitHub tag and release.
43
+
44
+ Published versions must not be overwritten.
45
+
46
+ ## Initial scope
47
+
48
+ Version 0.1.0 provides read-only communication,
49
+ typed device metadata and capability detection.
50
+
51
+ Persistent hardware identity depends on the
52
+ optional vendor-provided device_uid field.
53
+
54
+ Only Pironman 5 Max has been physically validated.
55
+
56
+ This is an independently maintained library.
57
+ It is not an official SunFounder or Home Assistant
58
+ product.
@@ -0,0 +1,47 @@
1
+ """Read Pironman information without changing hardware."""
2
+
3
+ import argparse
4
+ import asyncio
5
+
6
+ import aiohttp
7
+
8
+ from pironman import PironmanClient, PironmanError
9
+
10
+
11
+ async def main() -> None:
12
+ """Read device metadata and measurements."""
13
+ parser = argparse.ArgumentParser()
14
+ parser.add_argument("host")
15
+ parser.add_argument("--port", type=int, default=34001)
16
+ args = parser.parse_args()
17
+
18
+ async with aiohttp.ClientSession() as session:
19
+ client = PironmanClient(
20
+ args.host,
21
+ session,
22
+ port=args.port,
23
+ )
24
+
25
+ info = await client.async_get_device_info()
26
+ data = await client.async_get_data()
27
+ config = await client.async_get_config()
28
+
29
+ print("Model:", info.get("name", "Unknown"))
30
+ print("Version:", info.get("version", "Unknown"))
31
+ print("Device information fields:", len(info))
32
+ print("Measurement fields:", len(data))
33
+ print("Configuration fields:", len(config))
34
+
35
+ print("Device UID available:", bool(info.get("device_uid")))
36
+
37
+ try:
38
+ ips = await client.async_get_ips()
39
+ print("Network endpoint:", type(ips).__name__)
40
+ except PironmanError:
41
+ print("Optional network endpoint unavailable")
42
+
43
+ print("Read-only hardware validation: PASS")
44
+
45
+
46
+ if __name__ == "__main__":
47
+ asyncio.run(main())
@@ -0,0 +1,45 @@
1
+ """Read typed Pironman metadata without exposing identifiers."""
2
+
3
+ import argparse
4
+ import asyncio
5
+
6
+ import aiohttp
7
+
8
+ from pironman import PironmanClient
9
+
10
+
11
+ async def main() -> None:
12
+ """Display non-sensitive hardware metadata."""
13
+ parser = argparse.ArgumentParser()
14
+ parser.add_argument("host")
15
+ parser.add_argument("--port", type=int, default=34001)
16
+ args = parser.parse_args()
17
+
18
+ async with aiohttp.ClientSession() as session:
19
+ client = PironmanClient(
20
+ args.host,
21
+ session,
22
+ port=args.port,
23
+ )
24
+
25
+ info = await client.async_get_device_metadata()
26
+
27
+ print("Name:", info.name)
28
+ print("Detected model:", info.model)
29
+ print("Model ID:", info.model_id)
30
+ print("Version:", info.version)
31
+ print("Device UID available:", info.has_persistent_identity)
32
+
33
+ if info.peripherals is None:
34
+ print("Peripherals: unknown")
35
+ else:
36
+ print("Peripherals:", ", ".join(sorted(info.peripherals)))
37
+
38
+ for capability in ("oled", "ws2812", "storage"):
39
+ print(f"Supports {capability}:", info.supports(capability))
40
+
41
+ print("Device metadata validation: PASS")
42
+
43
+
44
+ if __name__ == "__main__":
45
+ asyncio.run(main())