This release is a pre-release and may not be stable for production use.
hidio core Client Python Library
HID-IO Core Client Side Library for Python
Getting
pip install hidiocore
Overview
This is a convenience Python library for the HID-IO daemon which handles automatic reconnection if the server goes down for any reason. The library also handles the HID-IO authentication procedure (key negotiation and TLS wrapping).
Usage
import asyncio
import sys
import hidiocore.client
# Optional callbacks
class MyHIDIOClient(hidiocore.client.HIDIOClient):
async def on_connect(self, cap):
print("Connected!")
print("Connected API Call", await cap.alive().a_wait())
async def on_disconnect(self):
print("Disconnected!")
async def main():
client = MyHIDIOClient('Python example.py')
# Connect the client to the server using a background task
# This will automatically reconnect
tasks = [asyncio.gather(*[client.connect(auth=hidiocore.client.HIDIOClient.AUTH_BASIC)], return_exceptions=True)]
while client.retry_connection_status():
if client.capability_hidioserver():
try:
print("API Call", await asyncio.wait_for(
client.capability_hidioserver().alive().a_wait(),
timeout=2.0
))
print("API Call", await asyncio.wait_for(
client.capability_authenticated().nodes().a_wait(),
timeout=2.0
))
except asyncio.TimeoutError:
print("Alive timeout.")
continue
await asyncio.sleep(5)
try:
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
except KeyboardInterrupt:
print("Ctrl+C detected, exiting...")
sys.exit(1)
Metadata
Release files for hidiocore 0.1.0b3
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 |
|---|---|---|---|---|
| hidiocore-0.1.0b3.tar.gz | 12.8 kB | Without provenance | Details for hidiocore-0.1.0b3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hidiocore-0.1.0b3-py3-none-any.whl | Python 3 | none | any | Details for hidiocore-0.1.0b3-py3-none-any.whl |
Total release size: 48.6 kB
Release files / hidiocore-0.1.0b3.tar.gz
| Download URL | hidiocore-0.1.0b3.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa5c10899496d28e7633632c575cec0d90b55e87ff7daad2e92443aac73239d5
|
|
BLAKE2b-256 checksum How to use checksums |
9a85ff61ef3643a112cde75fc77d978d9e697f99ad550a4ea32775a62e34cabb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.22.0
|
Release files / hidiocore-0.1.0b3-py3-none-any.whl
| Download URL | hidiocore-0.1.0b3-py3-none-any.whl |
|---|---|
| Size | 35.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d0772b548a0a82d569975f31ff26e33c5ba51889a60c85aa3f7b923d4257926
|
|
BLAKE2b-256 checksum How to use checksums |
8da3a0b1ff2a431d2e2dc37079f46baa52871e510b026e8b99014c4f7e817f0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.22.0
|
Security for hidiocore 0.1.0b3
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.