Skip to main content

A low-level interface for loading binary Harp protocol data

Project description

harp-python

A low-level interface to data collected with the Harp binary protocol.

Data model

To regenerate Pydantic data models from device schema definitions, activate a virtual environment with dev dependencies, and run:

datamodel-codegen --input ./reflex-generator/schema/device.json --output harp/model.py --output-model-type pydantic_v2.BaseModel

[!IMPORTANT] Currently code generation adds an unwanted field at the very end of the data model definition registers: Optional[Any] = None. This declaration needs to be removed for serialization to work properly.

How to use

Read Harp device schema from YML file

from harp.schema import read_schema
schema = read_schema('device.yml')

Create device reader object from schema

from harp.reader import create_reader
reader = create_reader(schema)

Read data from named register

reader.OperationControl.read("data/Behavior_10.bin")

Access register metadata

reader.OperationControl.register.address

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

harp-python-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

harp_python-0.1.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file harp-python-0.1.0.tar.gz.

File metadata

  • Download URL: harp-python-0.1.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for harp-python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fef898c91298c3f7cfb1a8160ddee86e569fa0d239c3d3ee33ae4240740eb3fe
MD5 c39b687dfcdd67bf6ef5f9fd9230d935
BLAKE2b-256 fb825c7777ca23366d30e6d5fd1b52f46357cdf1f51dd14cedba1a992a5b6068

See more details on using hashes here.

File details

Details for the file harp_python-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: harp_python-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for harp_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 134440a1ed26ae530658de013671c8ce72473431a5d605d0e34caaddce08fbaa
MD5 a83254f4b2035b017835ee2678daddfa
BLAKE2b-256 bb805ab37011dc77a85966b9b0af64f8394040a53d0c5cee1d4d06e61b78a8e0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page