Palazzetti SDK - Local HUB
Library to interact with Palazzetti product via LOCAL HTTP HUB
Requires Python 3.6 and uses palazzetti-sdk-asset-parser to detect product capabilities.
import asyncio
from palazzetti_sdk_local_api import Hub
def main():
loop = asyncio.get_event_loop()
use_ip = "192.168.20.94"
hub = Hub(use_ip)
print("----- BEFORE UPDATE -----")
print(f"ID Hub: {hub.hub_id}")
print(f"Online: {hub.hub_online}")
print(f"BioCC: {hub.hub_isbiocc}")
print(f"Product Online: {hub.product_online}")
print("Attributes:")
print(hub.get_attributes())
# now update the hub without discovery only via UDP (deep=False)
print (f"Please wait, checking Hub at {use_ip}...")
loop.run_until_complete(hub.async_update(discovery=False, deep=False))
print("----- POST UPDATE -----")
if hub.hub_online:
print(f"Online: {hub.hub_online}")
print(f"Label: {hub.label}")
print(f"ID Hub: {hub.hub_id}")
print(f"BioCC: {hub.hub_isbiocc}")
print("Attributes:")
print(hub.get_attributes())
if hub.product_online:
print(f"Product Online: {hub.product_online}")
# now update the hub with discovery and HTTP failover if UDP fails (deep=True)
print (f"Please wait, discovering product details for Hub {hub.hub_id}...")
loop.run_until_complete(hub.async_update(discovery=True, deep=True))
if hub.product and hub.product.online:
print(f"ID Product: {hub.product.product_id}")
print("Product Capabilities:")
print(hub.product.get_data_config_json())
print("Product Attributes:")
print(hub.product.get_prod_data_json())
return
# this should neve happen...
print ("Product should be online but has not been initiated")
return
print ("Hub is online but no Product found")
return
print ("Hub offline")
Metadata
Release files for palazzetti-sdk-local-api 1.0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| palazzetti_sdk_local_api-1.0.14.tar.gz | 9.6 kB | Without provenance | Details for palazzetti_sdk_local_api-1.0.14.tar.gz |
Release files / palazzetti_sdk_local_api-1.0.14.tar.gz
| Download URL | palazzetti_sdk_local_api-1.0.14.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffc2964a28675924c1f30ded283f5229c80e2c14ad287afb5451a389c433caa8
|
|
BLAKE2b-256 checksum How to use checksums |
f243c026edd1d2c1dc123bb318238d586ffd4f4b957c59d9e3c1531b3eb57d56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Security for palazzetti-sdk-local-api 1.0.14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.