Skip to main content
transports logo, concentric circles with a line connecting them with points

Build Status codecov License PyPI

transports moves typed models across any wire as incremental patches.

A model is defined once as a pydantic model, stdlib dataclass, or msgspec struct. A Python process hosts it and mutates it normally, and transports sends only the patch needed to update a remote mirror. The same Rust core drives Python (PyO3) and JavaScript (wasm), so both sides share the same Value type, diff, patch application, and codecs.

import transports
from pydantic import BaseModel

class Device(BaseModel):
    name: str
    on: bool = False

session = transports.Session()
lamp = Device(name="lamp")
model_id = session.host(lamp)

lamp.on = True
print(session.drain())
# [(1, {'rev': 1, 'ops': [{'Set': {'path': [{'Key': 'on'}], 'value': {'Bool': True}}}]})]

Install

pip install transports
pip install "transports[connections]"   # WebSocket server/client adapters
pip install "transports[sse]"           # Server-Sent Events adapter
pip install "transports[jupyter]"       # Jupyter comm adapter

Documentation

Tutorial

Quickstart builds one hosted model and mirrors it with the in-process server/client protocol.

How-to guides

Model bridges covers pydantic, dataclasses, msgspec, schemas, and plain JavaScript objects. Connections covers WebSocket, SSE, Jupyter comm, and anywidget adapters. Codecs covers JSON, MessagePack, and custom codecs. Multi-tenancy and sharing covers tenant isolation, shared models, and merge strategies. Pyodide covers building and loading transports in a browser.

Reference

API reference lists the Python API. Wire protocol reference describes Value, patch operations, protocol messages, codecs, and model ids. Benchmark results reports recorded server fan-out latency, completion time, and resource use.

Explanation

Concepts explains why transports uses incremental patches, server-owned revisions, a shared Rust core, and transport-agnostic adapters.

Metadata

Release files for transports 0.12.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for transports 0.12.2
File Size Uploaded Provenance Actions
transports-0.12.2.tar.gz 2.0 MB Without provenance Details for transports-0.12.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for transports 0.12.2
File Actions
transports-0.12.2-cp314-cp314-pyemscripten_2026_0_wasm32.whl CPython 3.14 CPython 3.14 PyEmscripten 2026.0+ WebAssembly Details for transports-0.12.2-cp314-cp314-pyemscripten_2026_0_wasm32.whl
transports-0.12.2-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for transports-0.12.2-cp311-abi3-win_amd64.whl
transports-0.12.2-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for transports-0.12.2-cp311-abi3-manylinux_2_28_x86_64.whl
transports-0.12.2-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for transports-0.12.2-cp311-abi3-manylinux_2_28_aarch64.whl
transports-0.12.2-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for transports-0.12.2-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 15.9 MB

Release files / transports-0.12.2.tar.gz

Download URL transports-0.12.2.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
e05b212401edc2415dc4dac4b04b59daab14b3b2ac0623e0b3c1bf63c0bc2422
BLAKE2b-256 checksum
How to use checksums
7e4ea5786a9e32842f67c00cd693b7fa4f7c51210a5ce8fd55c75e2e7850ed14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / transports-0.12.2-cp314-cp314-pyemscripten_2026_0_wasm32.whl

Download URL transports-0.12.2-cp314-cp314-pyemscripten_2026_0_wasm32.whl
Size 2.4 MB
Tags CPython 3.14 PyEmscripten 2026.0+ WebAssembly
SHA-256 checksum
How to use checksums
5ce5a8b6d3ecf3a76e7c8611a4e5f7300b0942a6a7911cf02124b107f9d66ca3
BLAKE2b-256 checksum
How to use checksums
d59bcb1cc4aa08d23c9936238a80cab498ad846db51a72fbfc2f62ea0aadcba0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / transports-0.12.2-cp311-abi3-win_amd64.whl

Download URL transports-0.12.2-cp311-abi3-win_amd64.whl
Size 2.8 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a0bb667e4cd0134bd4bb919e2f8f457e71df2da238eb55987349ee6d6b6659c2
BLAKE2b-256 checksum
How to use checksums
6b57799a537f1da7845f8b94d0da9251cd8ad3a6dbdbf39b7b6e405ed35ddccc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / transports-0.12.2-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL transports-0.12.2-cp311-abi3-manylinux_2_28_x86_64.whl
Size 3.0 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
b6d8874cce4aab3de6f90c6542b918c4e793b19b25ce8060059828b5326a302f
BLAKE2b-256 checksum
How to use checksums
8b0c9c268fe3d03e73319819feac46e24f06b93171083f0c79045e56126f2e20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / transports-0.12.2-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL transports-0.12.2-cp311-abi3-manylinux_2_28_aarch64.whl
Size 2.9 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
b6a6f87b40d65fa056527461a073a11804d7e3d3c8a32f7818f1a6ce69f71c81
BLAKE2b-256 checksum
How to use checksums
b25b1cbbe3679264418d708a99bc9f694f5d4427cebda569de2f9fcb65ced84c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / transports-0.12.2-cp311-abi3-macosx_11_0_arm64.whl

Download URL transports-0.12.2-cp311-abi3-macosx_11_0_arm64.whl
Size 2.8 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a9fee1c5dac164c54298a1ce60c5e4f80b05946ae17ca2531ecc5bf54e78acc1
BLAKE2b-256 checksum
How to use checksums
8af652c40b818df539fefb5c817f65ff2d8f205697edbd42e1b0e7c65100629f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for transports 0.12.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page