feat(bindings): dvb-si-py — PyO3/maturin Python bindings (#66) - #274
Merged
Merged
Conversation
Read-only Python bindings over dvb-si/dvb-t2mi (Extensions report §5.3, now ungated): - parse_section(bytes) -> dict; Demux (SiDemux) + T2miDemux (T2miPump) classes with feed(packet) -> list[dict]. Parsed structs convert Rust → serde_json → Python objects, leaning on the crates' Serialize-only serde posture (read-only by design — parse, don't build). - abi3 wheel (CPython >=3.9) via PyO3 0.24 + maturin; module dvb_si_py. Lives in bindings/python/, OUTSIDE the Rust workspace (PyO3 MSRV moves faster than the workspace 1.81) — consumes the published dvb-si/dvb-t2mi crates by version (7.6), not path. Own CI workflow (python-bindings.yml): maturin develop + pytest on PR; build wheels (linux/macos/windows) + publish to PyPI on a dvb-si-py-v* tag (artifacts only from CI). Validated: maturin develop builds the wheel + 3 pytest tests pass, decoding 237 real sections (PAT/PMT/SDT/NIT/EIT) off the tnt capture from Python. Closes #66
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Read-only Python bindings over
dvb-si/dvb-t2mi— the demand-gated story (Extensions report §5.3), now ungated on your go.API
parse_section(bytes) -> dict— parse one SI/PSI section into a Python dict.Demux()(wrapsSiDemux) +T2miDemux(pid)(wrapsT2miPump) —feed(packet) -> list[dict].serde_json→ Python objects (read-only by design — leans on the crates' Serialize-only serde posture; keys mirror the Rust API, camelCase).dvb_si_py.Decoupled by design
Lives in
bindings/python/, outside the Rust workspace (PyO3 MSRV > workspace 1.81) — consumes the publisheddvb-si/dvb-t2mi7.6 crates by version, not path. Core crates untouched.CI (
python-bindings.yml)bindings/**):maturin develop+pytest.dvb-si-py-v*tag: build wheels (linux/macos/windows) + publish to PyPI (--skip-existing,PYPI_API_TOKEN). Wheels are the only Python artifact, CI-only.Validated
maturin developbuilds the wheel; 3 pytest tests pass, decoding 237 real sections (PAT/PMT/SDT/NIT/EIT) off the committed tnt capture from Python.Closes #66
🤖 Generated with Claude Code