harp-serial
Serial transport for harp-device. Provides SerialTransport and the open_device factory, which pairs a device module or a Device class with a serial port. This is the package that pulls in pyserial.
Usage
Like the builtin open, the returned device is connected and ready. Use it in a with block for guaranteed cleanup:
from harp import serial
from harp.device import behavior, core
# Use "COMx" on Windows, "/dev/ttyUSBx" on Linux.
with serial.open_device(behavior, port="COM3") as device:
print(device.read(core.WhoAmI).payload) # a core register
print(device.read(behavior.AnalogData).payload) # a device register
Passing a device module validates the device identity on open. Pass a Device subclass instead to preserve its own type, or omit the argument entirely for schema-free access, which skips the identity check.
harp-serial is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file harp_serial-0.5.0.tar.gz.
File metadata
- Download URL: harp_serial-0.5.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
192d202d6e2ca48923ada2d185c8a68d90dce47843591d251fa2c793d1e2a713
|
|
| MD5 |
16f36f1fec461e61989cc23911910b0b
|
|
| BLAKE2b-256 |
5d7d2a8a97edc3c63258d77d124c77f4fc7ec685d5c80884944c6a05bffc0c35
|
File details
Details for the file harp_serial-0.5.0-py3-none-any.whl.
File metadata
- Download URL: harp_serial-0.5.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1fd7d1b547d2e470e5d3dfff9dbcbfdf445b8b1ba323cc774b071b9dc4cc280
|
|
| MD5 |
57c6e6f015d69fadcb3dea970fa99e06
|
|
| BLAKE2b-256 |
ee5fa995eb0e17064690d72c90bb2af85224ea37f9162b1ce076a2752953810a
|