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.

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

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.1
File Size Uploaded
transports-0.8.1.tar.gz 416.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for transports 0.8.1
File
transports-0.8.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl CPython 3.14 CPython 3.14 PyEmscripten 2026.0+ WebAssembly Details
transports-0.8.1-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
transports-0.8.1-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details
transports-0.8.1-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details
transports-0.8.1-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.1.tar.gz

Download URL transports-0.8.1.tar.gz
Size 416.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4ad11d4ae9a2bd4332713f9a33fcdf368d8ea1f1d0f6bfc0d93a0fb5c6c01f5c
BLAKE2b-256 checksum
How to use checksums
9f85dfef22a0a64b772e6d2da4ed6f606c8449e840d8d61d4607f9b7dff9c6fb
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.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl

Download URL transports-0.8.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl
Size 545.2 kB
Tags CPython 3.14 PyEmscripten 2026.0+ WebAssembly
SHA-256 checksum
How to use checksums
4afdb96f38169f5446e689b790ff95d02b42ff7a6bdf2532b658159b3c8637ee
BLAKE2b-256 checksum
How to use checksums
5a3b3360fa0bb768910ec10dbd18fca104f93d77735c82a3a6aadce222030d0a
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.1-cp311-abi3-win_amd64.whl

Download URL transports-0.8.1-cp311-abi3-win_amd64.whl
Size 693.9 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
89d8a76a61c5f4bfe04f4a92f799c94da3474d0ebc74372824ed8cc34899cb41
BLAKE2b-256 checksum
How to use checksums
d429d0eec8af05f10bb9e75678ee3b5b43e33091493d7418f29c5a3089ac135c
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.1-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL transports-0.8.1-cp311-abi3-manylinux_2_28_x86_64.whl
Size 820.5 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
1eda3b51096c96dc658f8d6ea5e17cfdf8a3b6ee8048dc100c8bc385a44f3a24
BLAKE2b-256 checksum
How to use checksums
67c14f964997f9ae754576edd31fbd13a891dc964aff3f59545a0c574cabd1f5
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.1-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL transports-0.8.1-cp311-abi3-manylinux_2_28_aarch64.whl
Size 792.2 kB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
17639cb57f951f36c317a78e61f5776401caa5166fef1e876b26e767473bbd43
BLAKE2b-256 checksum
How to use checksums
a9bbff705f116da02ccaee91765099d17a81dbe1d5ec7c883859ef0627265b91
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.1-cp311-abi3-macosx_11_0_arm64.whl

Download URL transports-0.8.1-cp311-abi3-macosx_11_0_arm64.whl
Size 747.7 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
60180b91d80ec893ff8600fa81485bba15c9cf9e59628d6f46e05822197ee75a
BLAKE2b-256 checksum
How to use checksums
b6fc0e3d717f12e488b9082d21303bfc45d952d4a1b5ba85176d5f96eaac947d
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

0.8.3

6 release files

0.8.2

6 release files

This release

0.8.1 This release

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