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

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.8.4
File Size Uploaded
transports-0.8.4.tar.gz 941.1 kB Details

Built distributions (wheels)

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

Total release size: 7.5 MB

Release files / transports-0.8.4.tar.gz

Download URL transports-0.8.4.tar.gz
Size 941.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ac8077ed77c69ba24ee0192dacc30f55f55e82da9a9c9b74f65a4ce78b6dd735
BLAKE2b-256 checksum
How to use checksums
ae821ec23605a56563d2dc9b3a0c8f8bf1ae251ae78aab17fc6fe64df6ccf03f
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.8.4-cp314-cp314-pyemscripten_2026_0_wasm32.whl

Download URL transports-0.8.4-cp314-cp314-pyemscripten_2026_0_wasm32.whl
Size 1.1 MB
Tags CPython 3.14 PyEmscripten 2026.0+ WebAssembly
SHA-256 checksum
How to use checksums
9dde6cb8694db5bde53999af501ee4455c3e820f68db51089ea114fc77cb04db
BLAKE2b-256 checksum
How to use checksums
75ff6307cf3c34b1f5e4c4aacdaaa4b72a2713e400de260615d57a2f1c1e67a5
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.8.4-cp311-abi3-win_amd64.whl

Download URL transports-0.8.4-cp311-abi3-win_amd64.whl
Size 1.3 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
5032a55b2ac279b7df5e7ddd43db3e5c2dfff327d7ddc3b6e3ec262a1dce102d
BLAKE2b-256 checksum
How to use checksums
c1a50603ae2554cf6c8e8981ca3b29ad32c95d1eb71af0ff31325ebfc80f0398
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.8.4-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL transports-0.8.4-cp311-abi3-manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
7f76d71fe51aa753b612a801372c40e5a6c86e4a5ecb7ec7b018578ecccf2dd5
BLAKE2b-256 checksum
How to use checksums
77782936b678bdf606b86f672de606906ff75a1d31462a008182b3024141789a
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.8.4-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL transports-0.8.4-cp311-abi3-manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
5e5125a05194318c0e40f0ebb2725fc305d2cc8918056aeda0b87d39c68c92fa
BLAKE2b-256 checksum
How to use checksums
c9f9137291446c8c129ccdc1376dcea0cc71b31f07fff5ef0cf95e5af405ad74
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.8.4-cp311-abi3-macosx_11_0_arm64.whl

Download URL transports-0.8.4-cp311-abi3-macosx_11_0_arm64.whl
Size 1.3 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ad1406beb451f9eb8caa8e6fcf91a0299b72b1d6d5be46cf9f0e91ec12237568
BLAKE2b-256 checksum
How to use checksums
42a84eff9d431d9a4d93051d061c6eed5af6db21701a6d3b9a51d54485e60923
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

0.9.0

6 release files

0.8.6

6 release files

0.8.5

6 release files

This release

0.8.4 This release

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