> ## Documentation Index
> Fetch the complete documentation index at: https://docs.speckle.systems/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs contain multiple Speckle product experiences. For Speckle 2026.9, prefer /next/ pages for the topics and changes they cover. The navigation label Current does not override this version-specific precedence.
> Coverage under /next/ is incremental. Use Current documentation for unchanged topics and when a /next/ page says coverage is unavailable or explicitly refers you to Current. Do not infer a feature was removed from a missing page.
> Read the page-specific documentation status, applicability, affected guidance and replacement links in agent-only content. Impacted, changed and superseded apply only to the stated scope; they do not mean the entire feature is deprecated. Historical connector guides apply only to the legacy connector described.
> Match guidance to the customer's deployment version, model data format and connector. Respect plan, permission and compatibility restrictions. If an unknown version or data format changes the answer, ask a focused clarification; do not infer deployment version from the date alone.

# Transports

> Storage backends for sending and receiving Speckle objects

## Overview

Transports define where Speckle objects are stored and retrieved from. They provide a consistent interface for `operations.send()` and `operations.receive()`.

```python theme={null}
from specklepy.transports.server import ServerTransport

transport = ServerTransport(stream_id="project_id", client=client)
```

## ServerTransport

Sends and receives objects from a Speckle server. **This is the primary transport for production use.**

### Constructor

```python theme={null}
ServerTransport(
    stream_id: str,
    client: Optional[SpeckleClient] = None,
    account: Optional[Account] = None,
    token: Optional[str] = None,
    url: Optional[str] = None,
    name: str = "RemoteTransport"
)
```

Parameters:

<ResponseField name="stream_id" type="str" required>
  Project ID
</ResponseField>

<ResponseField name="client" type="SpeckleClient" default="None">
  Authenticated client
</ResponseField>

<ResponseField name="account" type="Account" default="None">
  Account object
</ResponseField>

<ResponseField name="token" type="str" default="None">
  Token (use with `url` parameter)
</ResponseField>

<ResponseField name="url" type="str" default="None">
  Server URL (use with `token` parameter)
</ResponseField>

<ResponseField name="name" type="str" default="&#x22;RemoteTransport&#x22;">
  Transport identifier
</ResponseField>

<Note>Provide **one** authentication method: `client`, `account`, or `token` + `url`.</Note>

### Usage

```python theme={null}
from specklepy.api import operations
from specklepy.transports.server import ServerTransport

# Create transport
transport = ServerTransport(stream_id="project_id", client=client)

# Send
object_id = operations.send(my_object, transports=[transport])

# Receive
obj = operations.receive(object_id, remote_transport=transport)
```

### Authentication Options

Using Client (Recommended):

```python theme={null}
transport = ServerTransport(stream_id="project_id", client=client)
```

Using Token:

```python theme={null}
transport = ServerTransport(
    stream_id="project_id",
    token="your_token",
    url="https://app.speckle.systems"
)
```

Using Account:

```python theme={null}
from specklepy.api.credentials import get_default_account

account = get_default_account()
transport = ServerTransport(stream_id="project_id", account=account)
```

## MemoryTransport

Stores objects in memory. Useful for testing and temporary operations.

```python theme={null}
from specklepy.transports.memory import MemoryTransport

transport = MemoryTransport()
```

Properties:

* `objects` (Dict\[str, str]) - Dictionary of stored objects
* `saved_object_count` (int) - Number of objects saved

<Warning>Data is lost when the application exits. Not suitable for production.</Warning>

## SQLiteTransport

Stores objects in a local SQLite database for persistent local storage.

```python theme={null}
from specklepy.transports.sqlite import SQLiteTransport

transport = SQLiteTransport(
    app_name="MyApp",
    scope="ProjectData"
)
```

Parameters:

<ResponseField name="base_path" type="str" default="None">
  Custom directory for database
</ResponseField>

<ResponseField name="app_name" type="str" default="&#x22;Speckle&#x22;">
  Application name
</ResponseField>

<ResponseField name="scope" type="str" default="&#x22;Objects&#x22;">
  Database scope/purpose
</ResponseField>

<ResponseField name="max_batch_size_mb" type="float" default="10.0">
  Batch size in MB
</ResponseField>

Database location:

* Windows: `%APPDATA%\{app_name}\{scope}.db`
* macOS: `~/Library/Application Support/{app_name}/{scope}.db`
* Linux: `~/.config/{app_name}/{scope}.db`

Use cases:

* Local caching of server data
* Offline workflows
* Persistent local storage

## Multiple Transports

Send to multiple locations simultaneously:

```python theme={null}
from specklepy.transports.server import ServerTransport
from specklepy.transports.sqlite import SQLiteTransport

server = ServerTransport(stream_id="project_id", client=client)
local = SQLiteTransport(app_name="MyApp")

# Send to both server and local cache
object_id = operations.send(my_object, transports=[server, local])

# Receive with local cache (checks local first)
obj = operations.receive(
    object_id,
    remote_transport=server,
    local_transport=local
)
```

## Custom Transports

Create custom transports by extending `AbstractTransport`:

```python theme={null}
from specklepy.transports.abstract_transport import AbstractTransport

class CustomTransport(AbstractTransport):
    def save_object(self, id: str, serialized_object: str) -> None:
        # Implement storage logic
        pass

    def get_object(self, id: str) -> Optional[str]:
        # Implement retrieval logic
        pass

    # Implement other required methods...
```

## Comparison

| Transport | Persistence | Network | Primary Use |
| - | - | - | - |
| ServerTransport | Server | Required | Production |
| MemoryTransport | None | No | Testing |
| SQLiteTransport | Local disk | No | Caching, offline |

## Related

<CardGroup cols={2}>
  <Card title="Operations" icon="plug" href="/developers/sdks/python/api-reference/operations">
    Send and receive operations
  </Card>

  <Card title="SpeckleClient" icon="user" href="/developers/sdks/python/api-reference/client">
    Client setup
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.