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.1.tar.gz (29.1 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.1-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.1.tar.gz.

File metadata

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

File hashes

Hashes for safeserial-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fd22dd849a90d9a41ce82b440e25d6fa5882355a9a940851fa02c10e00a13232
MD5 247f68d6d621a14efc0a0e10b7722799
BLAKE2b-256 29303ce09c6084bc2c45d028d493fe0aae5e9ee51f28a7da4a59c0b58c43c183

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for safeserial-0.1.1-cp39-cp39-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 8a8bba2d3d020358b4be1acc14cbd2e9af333a7d6f6b8dc9d014cddb7dfc2d33
MD5 6f821275031ff91af0b1fb9dd5ab104f
BLAKE2b-256 f1d89c26315836bd854733653891c7f4dc80538bc64ad00f2d8b159b17f9416e

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