Skip to main content

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

harp_serial-0.5.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

harp_serial-0.5.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

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

Hashes for harp_serial-0.5.0.tar.gz
Algorithm Hash digest
SHA256 192d202d6e2ca48923ada2d185c8a68d90dce47843591d251fa2c793d1e2a713
MD5 16f36f1fec461e61989cc23911910b0b
BLAKE2b-256 5d7d2a8a97edc3c63258d77d124c77f4fc7ec685d5c80884944c6a05bffc0c35

See more details on using hashes here.

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

Hashes for harp_serial-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1fd7d1b547d2e470e5d3dfff9dbcbfdf445b8b1ba323cc774b071b9dc4cc280
MD5 57c6e6f015d69fadcb3dea970fa99e06
BLAKE2b-256 ee5fa995eb0e17064690d72c90bb2af85224ea37f9162b1ce076a2752953810a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 files

0.4.0

2 files

0.3.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page