Skip to main content

Python implementation of the Bin-RPC protocol.

Project description

releasebadge License GitHub Sponsors

PyBinRPC

A lightweight Python 3 library that enable python libraries to interact with BinRPC backends.

Interoperability notes

Some BIN-RPC peers in the wild (e.g., CCU/CUxD stacks and clients based on hobbyquaker/binrpc) occasionally emit frames where the final double/float value appears truncated. In practice this happens when the 32-bit total length in the BIN header is smaller than the actual payload written, so the transport cuts the frame at the declared size. When this occurs in an event or system.multicall payload, the double’s 8-byte body may be shortened so only the 4-byte exponent is present and the 4-byte mantissa is missing.

To remain compatible with these devices, pybinrpc’s decoder is intentionally lenient:

  • Doubles: if the exponent or mantissa is missing, the decoder returns 0.0 and advances to the end of the buffer instead of raising.
  • Strings, binaries, integers, and booleans are decoded best-effort if the payload is shorter than declared.
  • Arrays in some system.multicall payloads may declare length 0 yet still contain one struct element; pybinrpc treats this as a single-element array.

See tests tests/test_truncated_double.py and tests/test_incoming_event_payload.py for concrete real-world frames and the expected behavior.

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

pybinrpc-2025.10.1.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

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

pybinrpc-2025.10.1-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file pybinrpc-2025.10.1.tar.gz.

File metadata

  • Download URL: pybinrpc-2025.10.1.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pybinrpc-2025.10.1.tar.gz
Algorithm Hash digest
SHA256 7c905263eb0f1531a53b0429416045ee5e66bb49aaf6aa5ab224e7f2ecde508b
MD5 242b1c0b100a6ed72975dd816e01afc5
BLAKE2b-256 6793616ff7b6e62863f89c8b8aef8fcfa8e23f57b01c5ec5e63767c3db1a461c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pybinrpc-2025.10.1.tar.gz:

Publisher: python-publish.yml on SukramJ/pybinrpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pybinrpc-2025.10.1-py3-none-any.whl.

File metadata

  • Download URL: pybinrpc-2025.10.1-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pybinrpc-2025.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bbbf61f94ad4003887609907bc8e9953980e4612841138e20305266e52407fb9
MD5 785438373ed32eccf6b799e8da8d4ade
BLAKE2b-256 b54284dfa89573a1190f002798793f13547876fa08292391459cab29158160bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pybinrpc-2025.10.1-py3-none-any.whl:

Publisher: python-publish.yml on SukramJ/pybinrpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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