hdc-py
A Python wrapper around the (Open)Harmony Device Connector hdc.
Using the library requires the hdc tool to already be installed.
Release notes and migration guide: CHANGELOG.md
The API is split into global hdc operations and target-specific device operations:
from hdc_py import Hdc
hdc = Hdc()
device = hdc.connect() # or hdc.connect(target="127.0.0.1:55555")
result = device.cmd("echo hello", capture_output=True, text=True)
HarmonyDeviceConnector remains available as a compatibility wrapper around a concrete connected device.
hdc-py is meant to make writing scripts for testing on OpenHarmony devices easier, and provide abstractions. Goals include:
- Improved error checking and validation of command success
- Multi-device support via
Hdc.connect(...)and automatic-t <target>scoping on device commands - Support
withsyntax to enable performance mode for a number of commands, and disable the performance mode again, even if an exception occurs
This library is still under active development and far from complete. Known limitations include:
- Only a subset of commands is currently wrapped
This library is not an official OpenHarmony project.
Metadata
Release files for hdc-py 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hdc_py-0.2.0.tar.gz | 10.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hdc_py-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.6 kB
Release files / hdc_py-0.2.0.tar.gz
| Download URL | hdc_py-0.2.0.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
661480578867f426e8f0da18499a348a54c0d198cbab6c42dff28d2539823180
|
|
BLAKE2b-256 checksum How to use checksums |
7b3eb4a73cfb0a9fb6d129e008e4a1bb3d9745eb076acd6065cdd2edcca92482
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / hdc_py-0.2.0-py3-none-any.whl
| Download URL | hdc_py-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41b715498c87f19a5ace1b78f7b98fd4f44d305b02abb5e9b45896fee0c23bec
|
|
BLAKE2b-256 checksum How to use checksums |
ccf407e995196670e374082d3c52c683fca1b8630d6d9e8685456c35450d6041
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|