Transport
Sub classes¶
| Name | Children | Inherits |
|---|---|---|
| SubprocessCLITransport clawd_code_sdk._internal.transport.subprocess_cli Subprocess transport using Claude Code CLI. |
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| ABC abc Helper class that provides a standard way to create an ABC using |
⋔ Inheritance diagram¶
graph TD
1708862286["transport.Transport"]
925645236["abc.ABC"]
2751680898["builtins.object"]
925645236 --> 1708862286
2751680898 --> 925645236
🛈 DocStrings¶
Bases: ABC
Abstract transport for Claude communication.
WARNING: This internal API is exposed for custom transport implementations (e.g., remote Claude Code connections). The Claude Code team may change or or remove this abstract class in any future release. Custom implementations must be updated to match interface changes.
This is a low-level transport interface that handles raw I/O with the Claude process or service. The Query class builds on top of this to implement the control protocol and message routing.
Source code in src/clawd_code_sdk/_internal/transport/__init__.py
close
abstractmethod
async
¶
connect
abstractmethod
async
¶
Connect the transport and prepare for communication.
For subprocess transports, this starts the process. For network transports, this establishes the connection.
Source code in src/clawd_code_sdk/_internal/transport/__init__.py
end_input
abstractmethod
async
¶
read_messages
abstractmethod
¶
Read and parse messages from the transport.
Yields:
| Type | Description |
|---|---|
AsyncIterator[dict[str, Any]]
|
Parsed JSON messages from the transport |
write
abstractmethod
async
¶
Write raw data to the transport.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
str
|
Raw string data to write (typically JSON + newline) |
required |