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.9.0

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.9.0
File Size Uploaded
transports-0.9.0.tar.gz 1.4 MB Details

Built distributions (wheels)

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

Total release size: 11.6 MB

Release files / transports-0.9.0.tar.gz

Download URL transports-0.9.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
e5b8a88527c11d3af56b6716e642db2cec1e542532d504c6949afa584642b46f
BLAKE2b-256 checksum
How to use checksums
172434bd00984b2fe868127145f8914fb9147866ea1491d3464beb3f5afe736c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL transports-0.9.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl
Size 1.8 MB
Tags CPython 3.14 PyEmscripten 2026.0+ WebAssembly
SHA-256 checksum
How to use checksums
6df9a3dbf8a0a1eedda994d00842e51241aa9b08cf18181e0c81863787649fd9
BLAKE2b-256 checksum
How to use checksums
984216f72a919967a4794d8231733063a5b483d56e831233370380aa4b0d8676
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL transports-0.9.0-cp311-abi3-win_amd64.whl
Size 2.0 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f4dfb4cbfaaf91a990f336a5362bb949d2ae6da88eb55cde71b492f04ffb2dfa
BLAKE2b-256 checksum
How to use checksums
0b13df52870d8652258522a689cd7d4d6ce98592a327464bcf6695970ec3d817
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL transports-0.9.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
457f41abea8ca9618eef9997cd9eb8aaddb7dfc404cec0cba569eb1fd2cf0dd2
BLAKE2b-256 checksum
How to use checksums
dd66b8fa56850eb449a5b4eb8d387ea9b516beed381fd12e95713716e3e9cded
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL transports-0.9.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 2.1 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
51a7ae568cde18e3b5261e501c6a9efb0d2b11c952e3e9b61908f33ba9e27212
BLAKE2b-256 checksum
How to use checksums
9480b3ba7849a139b800c31daf35d7f457cac0489c3c41c343a43df9438d62d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL transports-0.9.0-cp311-abi3-macosx_11_0_arm64.whl
Size 2.0 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1e4e0e441282afa303b7f885411466da65b594306a867a45cec82fe834108ac4
BLAKE2b-256 checksum
How to use checksums
be5056c5757e82e2aef8b3798b075dbc033245f2fa45782a17bc198e44b65d2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

0.10.0

6 release files

This release

0.9.0 This release

6 release files

0.8.6

6 release files

0.8.5

6 release files

0.8.4

6 release files

0.8.3

6 release files

0.8.2

6 release files

0.8.1

6 release files

0.8.0

5 release files

0.7.0

5 release files

0.6.0

4 release files

0.5.0

4 release files

0.4.0

4 release files

0.3.0

4 release files

0.1.2

5 release files

0.1.1

0.1.0

2 release files

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