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

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.6
File Size Uploaded
transports-0.8.6.tar.gz 943.1 kB Details

Built distributions (wheels)

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

Total release size: 7.6 MB

Release files / transports-0.8.6.tar.gz

Download URL transports-0.8.6.tar.gz
Size 943.1 kB
Tags Source
SHA-256 checksum
How to use checksums
58b43d9b515581ecb62a330721e86275a55017cc807ad1c8d639e5a5561bd817
BLAKE2b-256 checksum
How to use checksums
997cc8e61cee3245b14377c72fde46cb19082aa2cae61eac3bfc4168a93dd875
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.6-cp314-cp314-pyemscripten_2026_0_wasm32.whl

Download URL transports-0.8.6-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
fdc3adc59e6e8e7f1cc929641c9b0373d36dc66d143fde6e698db62566c6ce9a
BLAKE2b-256 checksum
How to use checksums
e30de8355e7d611673455f1e451c314e1e93eb498ea741aab81d7af97659b448
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.6-cp311-abi3-win_amd64.whl

Download URL transports-0.8.6-cp311-abi3-win_amd64.whl
Size 1.3 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
2f86f2af1df4c9277f7386545b8145458a947bce3dda291bf39247eb1b0322e3
BLAKE2b-256 checksum
How to use checksums
899b291b75b4fefc978a99dc1d8256aaa9e59770c0db26c7d60db77aed6565b4
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.6-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL transports-0.8.6-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
1745ac832d9a5e9debb471b3d9969c342c0b75eac09765dcb29dfaf047f451fb
BLAKE2b-256 checksum
How to use checksums
decd2f5357bde51bab15722122b8514d385edb4f2ff13740dceac79377398e23
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.6-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL transports-0.8.6-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
c412f2d8758876be3c60eb84b6996a8623da95a2749b8328d8c9e965fc3debfe
BLAKE2b-256 checksum
How to use checksums
7602fa943b18d042d9537f6abe165a2807008464112afa81fab66880e87e2d3b
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.6-cp311-abi3-macosx_11_0_arm64.whl

Download URL transports-0.8.6-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
23cc86a316fa04af9046a6b58f0c8d6ce340d72f506fda50c1083b67e4208bd8
BLAKE2b-256 checksum
How to use checksums
0edba0523bb4b27bae7a0051bb4877103e55144263c137661de512975997e5c3
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

This release

0.8.6 This release

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