Skip to main content

spoke-connect (Python)

PyPI package spoke-connect: SPOKE Connect session-core bindings (generated uniffi Python + native spoke_connect / libspoke_connect).

Packaging contract: connect-binding-channels.md §3.3.

Install

At spoke lockstep tag vX.Y.Z:

pip install spoke-connect==X.Y.Z

Platform wheels (py3-none-<platform>) ship for manylinux_2_35_x86_64, macosx_11_0_arm64, and win_amd64. Each wheel bundles that platform's shared library beside the spoke_connect module (uniffi ctypes loader contract). Version locksteps with the spoke monorepo SemVer / git tag vX.Y.Z.

Release publishes via Trusted Publishing on the top-level release.yml workflow (publish-pypi job, OIDC). The PyPI Pending publisher for spoke-connect binds repository 42ch-dev/spoke to that workflow filename; the first successful stable-tag publish activates the project on PyPI.

Usage

import spoke_connect

peer_id = spoke_connect.derive_peer_id_from_ed25519_pubkey(pubkey)
protocol = spoke_connect.protocol_version()  # 1

Transport / WebSocket stays in the host product.

Layout

Path Contents
pyproject.toml Packable project (name = spoke-connect; lockstep SemVer)
setup.py Platform wheel tag hook (py3-none-<platform>; no sdist)
spoke_connect/ Import package — committed generated __init__.py + host native for smoke
native/ Staging contract for non-host RIDs (see native/README.md)
Smoke/ Golden-parity smoke (python3 -m unittest discover -s Smoke -v)

Maintainer: regenerate → stage native → wheel → smoke

Commands from the repository root (local nightly convention for cargo: cargo +nightly …).

# 1. Build the ffi cdylib (must run before generate — default build replaces the stub)
cargo +nightly build -p spoke-connect --features ffi --release

# 2. Generate bindings (first-party uniffi 0.32)
cargo +nightly run -p spoke-connect --features bindgen-cli --bin uniffi-bindgen -- \
  generate --library target/release/libspoke_connect.dylib \
  --language python --out-dir crates/spoke-connect/bindings/python/spoke_connect
mv crates/spoke-connect/bindings/python/spoke_connect/spoke_connect.py \
   crates/spoke-connect/bindings/python/spoke_connect/__init__.py

# 3. Stage host native beside the module (darwin arm64 example)
cp target/release/libspoke_connect.dylib \
  crates/spoke-connect/bindings/python/spoke_connect/
install_name_tool -id @rpath/libspoke_connect.dylib \
  crates/spoke-connect/bindings/python/spoke_connect/libspoke_connect.dylib

# 4. Golden-parity smoke (no wheel required)
PYTHONPATH=crates/spoke-connect/bindings/python \
  python3 -m unittest discover -s crates/spoke-connect/bindings/python/Smoke -v

# 5. Build platform wheel (host RID or CI artifact — recipe: tooling/connect/build-python-wheel.sh)
./tooling/connect/build-python-wheel.sh

# Release: all three wheels from build-connect-ffi artifacts
./tooling/connect/build-python-wheels-from-ffi.sh ffi-assembled

v1 publishes platform wheels only (no sdist): a source install cannot produce the native library without a Rust toolchain.

Committed natives (in-tree smoke)

Wheel platform (PEP 425) Native Status
macosx_11_0_arm64 spoke_connect/libspoke_connect.dylib Committed — maintainer-built (release)
manylinux_2_35_x86_64 libspoke_connect.so CI — stage from release.yml build-connect-ffi (linux-x64, ubuntu-22.04) before wheel build
win_amd64 spoke_connect.dll CI — stage from build-connect-ffi (win-x64) before wheel build

Reference

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

spoke_connect-0.8.2-py3-none-win_amd64.whl (1.6 MB view details)

Uploaded Python 3Windows x86-64

spoke_connect-0.8.2-py3-none-manylinux_2_35_x86_64.whl (846.8 kB view details)

Uploaded Python 3manylinux: glibc 2.35+ x86-64

spoke_connect-0.8.2-py3-none-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file spoke_connect-0.8.2-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for spoke_connect-0.8.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 7626a831db5b09ef603e6de0c24c8a50929a6ca89aa214331f30097cb0b1c955
MD5 6fc55ed1af10ad2a72afee5fdc816359
BLAKE2b-256 5c6542cc671179c9db1f1cc626b3a2e1a2e97f061f26f6dd85f8fbf89601216f

See more details on using hashes here.

Provenance

The following attestation bundles were made for spoke_connect-0.8.2-py3-none-win_amd64.whl:

Publisher: release.yml on 42ch-dev/spoke

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

File details

Details for the file spoke_connect-0.8.2-py3-none-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for spoke_connect-0.8.2-py3-none-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 00101917881fd207f6516306cd58dfc875b398fb85be964dc4af0f83ab507cd8
MD5 c557d6fd2258f1cbb1c23042a170e36f
BLAKE2b-256 9cec0ad8be824151f4fc95f0d4dc9c25c3e5d3af4c9e4ac0f14eb58062d2dec9

See more details on using hashes here.

Provenance

The following attestation bundles were made for spoke_connect-0.8.2-py3-none-manylinux_2_35_x86_64.whl:

Publisher: release.yml on 42ch-dev/spoke

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

File details

Details for the file spoke_connect-0.8.2-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spoke_connect-0.8.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2c7f9a1a660d23eaf362458e5db3d13e58defc4b25e93d851a5ec6834fd5ea01
MD5 6473b2a4bfe5512dba47d99deeec6677
BLAKE2b-256 c1d3492d2ed142ad662c90ee6a16eeb8fc6cc284bc6dd43d5e38f6cd796ecfdc

See more details on using hashes here.

Provenance

The following attestation bundles were made for spoke_connect-0.8.2-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on 42ch-dev/spoke

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