Skip to main content
transports logo, concentric circles with a line connecting them with points Move typed models across any wire as incremental patches.

Define a model once as a pydantic model, stdlib dataclass, or msgspec struct. Host it in Python, mutate it normally, and send only the patch needed to update a remote mirror. The same Rust core drives Python (PyO3) and JavaScript (wasm), so both sides use the same Value, diff, patch, and codec machinery.

Build Status codecov License PyPI

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.

[!NOTE] This library was generated using copier from the Base Python Project Template repository

Metadata

Release files for transports 0.8.3

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.3
File Size Uploaded
transports-0.8.3.tar.gz 419.5 kB Details

Built distributions (wheels)

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

Total release size: 4.0 MB

Release files / transports-0.8.3.tar.gz

Download URL transports-0.8.3.tar.gz
Size 419.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0ab95016cc1938bd2f52007fd0901cc93a0a9f25c48f28cd23df869edfa2c913
BLAKE2b-256 checksum
How to use checksums
e235924070fae440e1573f467f1d01c8358f74043d5ec4af4605300e5a93b0e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

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

Download URL transports-0.8.3-cp314-cp314-pyemscripten_2026_0_wasm32.whl
Size 546.9 kB
Tags CPython 3.14 PyEmscripten 2026.0+ WebAssembly
SHA-256 checksum
How to use checksums
d210d6e4fbda3416f58cb230c6a1c3b21f7fb18ca2544afc27fe18ae170cb0f7
BLAKE2b-256 checksum
How to use checksums
3eda2307c1dd23e13fa11c6d6274c5e9e869ad41b900cd3943ae45910d830566
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

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

Download URL transports-0.8.3-cp311-abi3-win_amd64.whl
Size 697.1 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0982447560da584c656e84c70979c0580f1c0a35b1002cb5844d81bdaa6fd450
BLAKE2b-256 checksum
How to use checksums
e06608b4ddb7902789f1db0bb673fc4afbe42ebab3ba3e66ecf171ce7600925d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

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

Download URL transports-0.8.3-cp311-abi3-manylinux_2_28_x86_64.whl
Size 823.7 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
59ac1ad96283cc03d70d4eadc03b85d167caaba382d53774bbbae593f90fc2c4
BLAKE2b-256 checksum
How to use checksums
ffe7226d22ed07f0f8d0ae17819f7974bdedd898ffd9eaf8f6a59e4543dcb9bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

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

Download URL transports-0.8.3-cp311-abi3-manylinux_2_28_aarch64.whl
Size 795.3 kB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
3a09517374ad5a17b67cbe1ffe52cb1da0f55b6dca9d4c542f7a31bcf7391277
BLAKE2b-256 checksum
How to use checksums
230af3f0bdb4e1114f20f4b474a15d380ccf2eba937d5f285da0d64a86a447af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

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

Download URL transports-0.8.3-cp311-abi3-macosx_11_0_arm64.whl
Size 750.9 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6d4659dc0edd00d13c5d1b237c72b0cfd781b07e41244cca7c5578e52ef2bf47
BLAKE2b-256 checksum
How to use checksums
a437a3f4679f70b19cb3672b6380757a0c6e2bfc5e5e13226f9a60c2f28641a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

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

0.8.4

6 release files

This release

0.8.3 This release

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