Skip to main content

Python bindings for SafeSerial SDK

Project description

SafeSerial for Python

Reliable serial messaging with CRC32, fragmentation, and ACK/Retry. Designed for workflows where silent corruption is unacceptable.

Install

pip install safeserial

Quickstart

import safeserial

bridge = safeserial.DataBridge()

def on_data(data):
    print("Received:", data)

if bridge.open("/dev/ttyUSB0", 115200, on_data):
    bridge.send(b"Hello, SafeSerial")
    bridge.close()

Why SafeSerial

  • Guaranteed delivery with ACK/Retry
  • CRC32 corruption detection
  • Automatic fragmentation and reassembly
  • Resilient reconnect support

API (Essentials)

DataBridge.open(port, baud_rate, on_data)

Opens a serial port with reliable communication enabled.

  • port: device path (e.g. /dev/ttyUSB0, COM3)
  • baud_rate: default 115200
  • on_data: callback for received payloads

Returns: bool (connected)

DataBridge.send(data)

Sends data with guaranteed delivery.

  • data: bytes

DataBridge.close()

Closes the serial port.

Build From Source

cd bindings/python
uv sync
uv pip install -e .

License

MIT

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

safeserial-0.1.3.tar.gz (146.7 kB view details)

Uploaded Source

Built Distribution

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

safeserial-0.1.3-cp39-cp39-macosx_26_0_arm64.whl (121.3 kB view details)

Uploaded CPython 3.9macOS 26.0+ ARM64

File details

Details for the file safeserial-0.1.3.tar.gz.

File metadata

  • Download URL: safeserial-0.1.3.tar.gz
  • Upload date:
  • Size: 146.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for safeserial-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e022f0f73970831889a84fa46ad07c95c11e181101fe70d922697ab57d808696
MD5 50a228fdc3277b2a00f85eaaa87ca8b0
BLAKE2b-256 a86e064a8460c15bd5d2f8d9d1ebb406c271cbfb9243618ee449f8cc19e815c6

See more details on using hashes here.

File details

Details for the file safeserial-0.1.3-cp39-cp39-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for safeserial-0.1.3-cp39-cp39-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 31a8bae932203858bfa4e7390f0c4aa547c3d61237ac32d6ba9ef5483bd584fe
MD5 8a161a01ace5669c129678f65de7c1d2
BLAKE2b-256 a9b8d109eb654d0cba33ded473881210339f38be0a700e0071aed4281c01c773

See more details on using hashes here.

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