# pyrophone

*module*

Typed declarations for asynchronous message-processing nodes.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/__init__.py#L1-L1)

## pyrophone.run

*attribute* · *module attribute*

```python
run = run_async
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/__init__.py#L25-L25)

## pyrophone.ChannelClosedError

*class*

```python
class ChannelClosedError(PyrophoneError)
```

Bases: `pyrophone._exceptions.PyrophoneError`

Re-exported from: `pyrophone._exceptions`

A value could not be accepted because the channel has closed.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_exceptions.py#L31-L32)

## pyrophone.CompiledEdge

*class* · *dataclass*

```python
class CompiledEdge(Printable)
```

Bases: `pyrophone._inspection.Printable`

Re-exported from: `pyrophone._compile`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L40-L58)

### pyrophone.CompiledEdge.destination_id

*attribute* · *instance attribute*

```python
destination_id: str
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L44-L44)

### pyrophone.CompiledEdge.destination_port

*attribute* · *instance attribute*

```python
destination_port: str
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L45-L45)

### pyrophone.CompiledEdge.source_id

*attribute* · *instance attribute*

```python
source_id: str
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L42-L42)

### pyrophone.CompiledEdge.source_port

*attribute* · *instance attribute*

```python
source_port: str
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L43-L43)

### pyrophone.CompiledEdge.print

*method*

```python
def print(file: TextIO | None = None) -> None
```

Inherited from: `pyrophone._inspection.Printable`

Write a pretty multiline description, followed by a newline.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_inspection.py#L13-L15)

## pyrophone.CompiledGraph

*class* · *dataclass*

```python
class CompiledGraph(Printable)
```

Bases: `pyrophone._inspection.Printable`

Re-exported from: `pyrophone._compile`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L61-L72)

### pyrophone.CompiledGraph.edges

*attribute* · *instance attribute*

```python
edges: tuple[CompiledEdge, ...]
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L64-L64)

### pyrophone.CompiledGraph.nodes

*attribute* · *instance attribute*

```python
nodes: tuple[CompiledNode, ...]
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L63-L63)

### pyrophone.CompiledGraph.print

*method*

```python
def print(file: TextIO | None = None) -> None
```

Inherited from: `pyrophone._inspection.Printable`

Write a pretty multiline description, followed by a newline.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_inspection.py#L13-L15)

## pyrophone.CompiledNode

*class* · *dataclass*

```python
class CompiledNode(Printable)
```

Bases: `pyrophone._inspection.Printable`

Re-exported from: `pyrophone._compile`

Configured occurrence retaining its original declaration ID.

Configuration is shallowly read-only, with nested values detached from the
authoring declaration so subsequent graph edits cannot change execution.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L14-L37)

### pyrophone.CompiledNode.configuration

*attribute* · *instance attribute*

```python
configuration: Mapping[str, object]
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L24-L24)

### pyrophone.CompiledNode.id

*attribute* · *instance attribute*

```python
id: str
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L22-L22)

### pyrophone.CompiledNode.node_type

*attribute* · *instance attribute*

```python
node_type: type[Node]
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L23-L23)

### pyrophone.CompiledNode.schema

*attribute* · *instance attribute*

```python
schema: NodeTypeSchema
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L25-L25)

### pyrophone.CompiledNode.print

*method*

```python
def print(file: TextIO | None = None) -> None
```

Inherited from: `pyrophone._inspection.Printable`

Write a pretty multiline description, followed by a newline.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_inspection.py#L13-L15)

## pyrophone.ConfigurationError

*class*

```python
class ConfigurationError(PyrophoneError, ValueError)
```

Bases: `pyrophone._exceptions.PyrophoneError`, `ValueError`

Re-exported from: `pyrophone._exceptions`

Configuration does not satisfy a node's schema.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_exceptions.py#L19-L20)

## pyrophone.Edge

*class* · *dataclass*

```python
class Edge(Printable)
```

Bases: `pyrophone._inspection.Printable`

Re-exported from: `pyrophone._graph`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L101-L123)

### pyrophone.Edge.destination

*attribute* · *instance attribute*

```python
destination: PortReference
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L104-L104)

### pyrophone.Edge.source

*attribute* · *instance attribute*

```python
source: PortReference
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L103-L103)

### pyrophone.Edge.print

*method*

```python
def print(file: TextIO | None = None) -> None
```

Inherited from: `pyrophone._inspection.Printable`

Write a pretty multiline description, followed by a newline.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_inspection.py#L13-L15)

## pyrophone.EndOfStream

*class*

```python
class EndOfStream(PyrophoneError)
```

Bases: `pyrophone._exceptions.PyrophoneError`

Re-exported from: `pyrophone._exceptions`

The input channel has closed and no more values can arrive.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_exceptions.py#L27-L28)

## pyrophone.Graph

*class*

```python
class Graph(Printable)
```

Bases: `pyrophone._inspection.Printable`

Re-exported from: `pyrophone._graph`

Editable graph with stable tuple inspection views.

``connect`` atomically adds endpoints and an edge, returning this graph.
``graph | declaration`` returns a new graph, connecting from the last node
in insertion order. Implicit selection uses only declared direction/default
metadata; existing bindings and compatible types never change that choice.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L213-L283)

### pyrophone.Graph.edges

*property*

```python
edges: tuple[Edge, ...]
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L243-L244)

### pyrophone.Graph.nodes

*property*

```python
nodes: tuple[NodeDeclaration, ...]
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L239-L240)

### pyrophone.Graph.connect

*method*

```python
def connect(source: PortReference, destination: PortReference) -> Graph
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L246-L272)

### pyrophone.Graph.print

*method*

```python
def print(file: TextIO | None = None) -> None
```

Inherited from: `pyrophone._inspection.Printable`

Write a pretty multiline description, followed by a newline.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_inspection.py#L13-L15)

## pyrophone.GraphError

*class*

```python
class GraphError(PyrophoneError, ValueError)
```

Bases: `pyrophone._exceptions.PyrophoneError`, `ValueError`

Re-exported from: `pyrophone._exceptions`

A graph connection or compiled graph is invalid.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_exceptions.py#L23-L24)

## pyrophone.Input

*class*

```python
class Input
```

Re-exported from: `pyrophone._ports`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_ports.py#L36-L69)

### pyrophone.Input.default

*attribute* · *instance attribute*

```python
default = default
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_ports.py#L41-L41)

### pyrophone.Input.description

*attribute* · *instance attribute*

```python
description = description
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_ports.py#L40-L40)

## pyrophone.InputPort

*class*

```python
class InputPort(Protocol)
```

Bases: `Protocol`

Re-exported from: `pyrophone._ports`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_ports.py#L14-L23)

### pyrophone.InputPort.close

*method* · *async*

```python
async def close() -> None
```

Stop accepting values, waking any blocked senders.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_ports.py#L19-L21)

### pyrophone.InputPort.recv

*method* · *async*

```python
async def recv() -> T
```

Receive the next value; cancellation follows the runtime task.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_ports.py#L15-L17)

## pyrophone.Node

*class*

```python
class Node(Printable)
```

Bases: `pyrophone._inspection.Printable`

Re-exported from: `pyrophone._node`

Base for node implementations. Runtime construction is framework-owned.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_node.py#L34-L52)

### pyrophone.Node.run

*method* · *async*

```python
async def run() -> None
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_node.py#L51-L52)

### pyrophone.Node.print

*method*

```python
def print(file: TextIO | None = None) -> None
```

Inherited from: `pyrophone._inspection.Printable`

Write a pretty multiline description, followed by a newline.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_inspection.py#L13-L15)

## pyrophone.NodeDeclaration

*class* · *dataclass*

```python
class NodeDeclaration(Printable)
```

Bases: `pyrophone._inspection.Printable`

Re-exported from: `pyrophone._graph`

An occurrence, with independent configuration and a stable unique ID.

Configuration is shallowly read-only; nested values are copied on creation.
No live node or user initializer is involved in creating a declaration.
Named attributes expose ports; use ``port(name)`` for ports whose names
collide with declaration fields or methods (such as ``id`` or ``port``).

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L17-L60)

### pyrophone.NodeDeclaration.configuration

*attribute* · *class attribute* · *instance attribute*

```python
configuration: Mapping[str, object] = field(default_factory=dict)
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L28-L28)

### pyrophone.NodeDeclaration.id

*attribute* · *class attribute* · *instance attribute*

```python
id: str = field(default_factory=lambda : uuid4().hex, init=False)
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L29-L29)

### pyrophone.NodeDeclaration.node_type

*attribute* · *instance attribute*

```python
node_type: type[Node]
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L27-L27)

### pyrophone.NodeDeclaration.schema

*attribute* · *class attribute* · *instance attribute*

```python
schema: NodeTypeSchema = field(init=False)
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L30-L30)

### pyrophone.NodeDeclaration.port

*method*

```python
def port(name: str) -> PortReference
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L49-L54)

### pyrophone.NodeDeclaration.print

*method*

```python
def print(file: TextIO | None = None) -> None
```

Inherited from: `pyrophone._inspection.Printable`

Write a pretty multiline description, followed by a newline.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_inspection.py#L13-L15)

## pyrophone.NodeExecutionError

*class*

```python
class NodeExecutionError(PyrophoneError)
```

Bases: `pyrophone._exceptions.PyrophoneError`

Re-exported from: `pyrophone._exceptions`

A node initializer or run method failed; __cause__ holds the original.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_exceptions.py#L35-L42)

### pyrophone.NodeExecutionError.node_id

*attribute* · *instance attribute*

```python
node_id = node_id
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_exceptions.py#L39-L39)

### pyrophone.NodeExecutionError.node_type

*attribute* · *instance attribute*

```python
node_type = node_type
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_exceptions.py#L40-L40)

### pyrophone.NodeExecutionError.node_type_name

*attribute* · *instance attribute*

```python
node_type_name = node_type.__name__
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_exceptions.py#L41-L41)

## pyrophone.NodeHandle

*class*

```python
class NodeHandle(Printable)
```

Bases: `pyrophone._inspection.Printable`

Re-exported from: `pyrophone._control`

Runtime-owned editing access to one node, without exposing its instance.

Attribute assignment validates and immediately replaces a property value.
Edits must run on the node's event loop while the node is active. Reads and
configuration snapshots are detached copies; edit containers by assignment.
For names colliding with handle metadata/methods, use get_property/set_property.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L17-L139)

### pyrophone.NodeHandle.active

*property*

```python
active: bool
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L65-L66)

### pyrophone.NodeHandle.configuration

*property*

```python
configuration: Mapping[str, object]
```

Return a detached, read-only snapshot of current property values.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L69-L71)

### pyrophone.NodeHandle.id

*property*

```python
id: str
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L53-L54)

### pyrophone.NodeHandle.node_type

*property*

```python
node_type: type[Node]
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L57-L58)

### pyrophone.NodeHandle.schema

*property*

```python
schema: NodeTypeSchema
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L61-L62)

### pyrophone.NodeHandle.get_property

*method*

```python
def get_property(name: str) -> object
```

Read a property by name, including names reserved by the handle.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L94-L98)

### pyrophone.NodeHandle.port

*method*

```python
def port(name: str) -> PortHandle
```

Inspect or trace a named runtime port, including reserved names.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L78-L82)

### pyrophone.NodeHandle.set_property

*method*

```python
def set_property(name: str, value: object) -> None
```

Validate, copy, and apply one value without yielding or invoking hooks.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L100-L111)

### pyrophone.NodeHandle.print

*method*

```python
def print(file: TextIO | None = None) -> None
```

Inherited from: `pyrophone._inspection.Printable`

Write a pretty multiline description, followed by a newline.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_inspection.py#L13-L15)

## pyrophone.NodeTypeSchema

*class* · *dataclass*

```python
class NodeTypeSchema
```

Re-exported from: `pyrophone._schema`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L45-L58)

### pyrophone.NodeTypeSchema.description

*attribute* · *instance attribute*

```python
description: str | None
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L48-L48)

### pyrophone.NodeTypeSchema.inputs

*attribute* · *instance attribute*

```python
inputs: Mapping[str, PortSchema]
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L50-L50)

### pyrophone.NodeTypeSchema.name

*attribute* · *instance attribute*

```python
name: str
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L47-L47)

### pyrophone.NodeTypeSchema.outputs

*attribute* · *instance attribute*

```python
outputs: Mapping[str, PortSchema]
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L51-L51)

### pyrophone.NodeTypeSchema.properties

*attribute* · *instance attribute*

```python
properties: Mapping[str, PropertySchema]
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L49-L49)

## pyrophone.Output

*class*

```python
class Output
```

Re-exported from: `pyrophone._ports`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_ports.py#L72-L105)

### pyrophone.Output.default

*attribute* · *instance attribute*

```python
default = default
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_ports.py#L77-L77)

### pyrophone.Output.description

*attribute* · *instance attribute*

```python
description = description
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_ports.py#L76-L76)

## pyrophone.OutputPort

*class*

```python
class OutputPort(Protocol)
```

Bases: `Protocol`

Re-exported from: `pyrophone._ports`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_ports.py#L26-L33)

### pyrophone.OutputPort.close

*method* · *async*

```python
async def close() -> None
```

Announce end of stream and reject unaccepted sends.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_ports.py#L31-L33)

### pyrophone.OutputPort.send

*method* · *async*

```python
async def send(value: T) -> None
```

Wait until a receiver accepts the value, without processing acknowledgement.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_ports.py#L27-L29)

## pyrophone.PortHandle

*class*

```python
class PortHandle(Printable)
```

Bases: `pyrophone._inspection.Printable`

Re-exported from: `pyrophone._control`

Inspection and tracing access to one live port; it cannot send or receive.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L142-L195)

### pyrophone.PortHandle.direction

*property*

```python
direction: Literal['input', 'output']
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L168-L169)

### pyrophone.PortHandle.name

*property*

```python
name: str
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L164-L165)

### pyrophone.PortHandle.node

*property*

```python
node: NodeHandle
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L160-L161)

### pyrophone.PortHandle.schema

*property*

```python
schema: PortSchema
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L172-L178)

### pyrophone.PortHandle.trace

*method*

```python
def trace(callback: Callable[[object], None]) -> Trace
```

Observe accepted transfers synchronously. The callback must not block.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L180-L183)

### pyrophone.PortHandle.print

*method*

```python
def print(file: TextIO | None = None) -> None
```

Inherited from: `pyrophone._inspection.Printable`

Write a pretty multiline description, followed by a newline.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_inspection.py#L13-L15)

## pyrophone.PortReference

*class* · *dataclass*

```python
class PortReference(Printable)
```

Bases: `pyrophone._inspection.Printable`

Re-exported from: `pyrophone._graph`

A named port on one occurrence, never a live runtime endpoint.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L63-L98)

### pyrophone.PortReference.direction

*attribute* · *instance attribute*

```python
direction: Direction
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L69-L69)

### pyrophone.PortReference.name

*attribute* · *instance attribute*

```python
name: str
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L68-L68)

### pyrophone.PortReference.node

*attribute* · *instance attribute*

```python
node: NodeDeclaration
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L67-L67)

### pyrophone.PortReference.schema

*property*

```python
schema: PortSchema
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_graph.py#L86-L98)

### pyrophone.PortReference.print

*method*

```python
def print(file: TextIO | None = None) -> None
```

Inherited from: `pyrophone._inspection.Printable`

Write a pretty multiline description, followed by a newline.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_inspection.py#L13-L15)

## pyrophone.PortSchema

*class* · *dataclass*

```python
class PortSchema
```

Re-exported from: `pyrophone._schema`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L37-L42)

### pyrophone.PortSchema.default

*attribute* · *class attribute* · *instance attribute*

```python
default: bool = False
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L42-L42)

### pyrophone.PortSchema.description

*attribute* · *class attribute* · *instance attribute*

```python
description: str | None = None
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L41-L41)

### pyrophone.PortSchema.name

*attribute* · *instance attribute*

```python
name: str
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L39-L39)

### pyrophone.PortSchema.type

*attribute* · *instance attribute*

```python
type: object
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L40-L40)

## pyrophone.Property

*class*

```python
class Property
```

Re-exported from: `pyrophone._properties`

Declare a typed property; omitting default makes it required.

Values are bound separately for each runtime instance. Configuration is
shallowly read-only: callers may still mutate a mutable value's contents.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_properties.py#L14-L64)

### pyrophone.Property.default

*attribute* · *instance attribute*

```python
default = default
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_properties.py#L31-L31)

### pyrophone.Property.description

*attribute* · *instance attribute*

```python
description = description
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_properties.py#L33-L33)

### pyrophone.Property.maximum

*attribute* · *instance attribute*

```python
maximum = maximum
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_properties.py#L35-L35)

### pyrophone.Property.minimum

*attribute* · *instance attribute*

```python
minimum = minimum
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_properties.py#L34-L34)

### pyrophone.Property.step

*attribute* · *instance attribute*

```python
step = step
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_properties.py#L36-L36)

### pyrophone.Property.title

*attribute* · *instance attribute*

```python
title = title
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_properties.py#L32-L32)

## pyrophone.PropertySchema

*class* · *dataclass*

```python
class PropertySchema
```

Re-exported from: `pyrophone._schema`

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L21-L34)

### pyrophone.PropertySchema.default

*attribute* · *class attribute* · *instance attribute*

```python
default: object = _MISSING
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L25-L25)

### pyrophone.PropertySchema.description

*attribute* · *class attribute* · *instance attribute*

```python
description: str | None = None
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L27-L27)

### pyrophone.PropertySchema.maximum

*attribute* · *class attribute* · *instance attribute*

```python
maximum: int | float | None = None
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L29-L29)

### pyrophone.PropertySchema.minimum

*attribute* · *class attribute* · *instance attribute*

```python
minimum: int | float | None = None
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L28-L28)

### pyrophone.PropertySchema.name

*attribute* · *instance attribute*

```python
name: str
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L23-L23)

### pyrophone.PropertySchema.step

*attribute* · *class attribute* · *instance attribute*

```python
step: int | float | None = None
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L30-L30)

### pyrophone.PropertySchema.title

*attribute* · *class attribute* · *instance attribute*

```python
title: str | None = None
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L26-L26)

### pyrophone.PropertySchema.type

*attribute* · *instance attribute*

```python
type: object
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L24-L24)

### pyrophone.PropertySchema.required

*property*

```python
required: bool
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_schema.py#L33-L34)

## pyrophone.PyrophoneError

*class*

```python
class PyrophoneError(Exception)
```

Bases: `Exception`

Re-exported from: `pyrophone._exceptions`

Base class for errors reported by Pyrophone.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_exceptions.py#L11-L12)

## pyrophone.Runtime

*class*

```python
class Runtime(Printable)
```

Bases: `pyrophone._inspection.Printable`

Re-exported from: `pyrophone._control`

Runtime-owned controller exposing handles in graph insertion order.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L198-L229)

### pyrophone.Runtime.compiled_graph

*property*

```python
compiled_graph: CompiledGraph
```

The startup snapshot; live edits do not mutate it.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L212-L214)

### pyrophone.Runtime.nodes

*property*

```python
nodes: tuple[NodeHandle, ...]
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_control.py#L208-L209)

### pyrophone.Runtime.print

*method*

```python
def print(file: TextIO | None = None) -> None
```

Inherited from: `pyrophone._inspection.Printable`

Write a pretty multiline description, followed by a newline.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_inspection.py#L13-L15)

## pyrophone.SchemaError

*class*

```python
class SchemaError(PyrophoneError, ValueError)
```

Bases: `pyrophone._exceptions.PyrophoneError`, `ValueError`

Re-exported from: `pyrophone._exceptions`

A node declaration has an invalid or unresolved schema.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_exceptions.py#L15-L16)

## pyrophone.Trace

*class*

```python
class Trace
```

Re-exported from: `pyrophone._trace`

A port trace registration. close() removes it synchronously and idempotently.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_trace.py#L12-L43)

### pyrophone.Trace.active

*property*

```python
active: bool
```

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_trace.py#L23-L24)

### pyrophone.Trace.close

*method*

```python
def close() -> None
```

Stop future notifications; call from the runtime's event loop.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_trace.py#L26-L37)

## pyrophone.compile_graph

*function*

```python
def compile_graph(graph: Graph) -> CompiledGraph
```

Re-exported from: `pyrophone._compile`

Validate every connection and configuration without allocating live nodes.

Every declared input and output must have exactly one channel. Empty graphs
and portless nodes are valid. The returned tuples and copied configuration
are independent of later authoring graph changes.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_compile.py#L75-L118)

## pyrophone.main

*function*

```python
def main(target: Graph | _Factory | None = None, /) -> _Factory | _Decorator | None
```

Re-exported from: `pyrophone._entry`

Run a graph directly, or mark a graph factory as a script entry point.

``main(graph)`` immediately invokes the command-line driver, even on import.
The driver parses arguments before executing the graph or its factory.
``@main`` and ``@main()`` execute a zero-argument sync or async factory only
when its module is __main__. The factory and graph share an event loop.
Decoration always returns the original function; imported factories remain
callable and retain their static types.

Put decorated entry points after their dependencies: execution begins when
Python evaluates the decorator. Empty parentheses reserve space for future
options; no configuration arguments are currently accepted.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_entry.py#L32-L53)

## pyrophone.node_type

*function*

```python
def node_type() -> type[N]
```

Re-exported from: `pyrophone._node`

Register a class's immutable schema without constructing an instance.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_node.py#L82-L128)

## pyrophone.node_type_schema

*function*

```python
def node_type_schema() -> NodeTypeSchema
```

Re-exported from: `pyrophone._node`

Return this class's schema; subclasses require their own registration.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_node.py#L165-L170)

## pyrophone.run_async

*function* · *async*

```python
async def run_async(graph: Graph, *, on_graph: Callable[[CompiledGraph], None] | None = None, execute: bool = True, on_runtime: Callable[[Runtime], None] | None = None, session: _Session | None = None) -> None
```

Re-exported from: `pyrophone._runtime`

Run a fresh instance of each node after validating the entire graph.

on_graph observes the validated snapshot before any live nodes are allocated.
execute=False validates and observes the graph without running it. Neither
option parses command-line arguments. An optional session runs alongside
the graph; completion of either cancels and awaits the other.
on_runtime receives editing handles after all initializers finish, before
node tasks or the session start. execute=False skips this callback too.

Normal return closes a node's outputs and inputs. A failed node cancels its
siblings; cancellation awaits their cooperative cleanup. Run failures appear
in TaskGroup exception groups containing one or more NodeExecutionErrors,
each retaining the original exception as its cause. Initialization failures
raise NodeExecutionError directly, before any node run tasks are started.

Nodes should own asynchronous resources inside run(), using async context
managers or try/finally. The runtime closes its endpoints, but cannot unwind
arbitrary resources acquired by user initializers. There are no forced
cancellation timeouts, restart policies, or background runtime tasks.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_runtime.py#L41-L98)

## pyrophone.run_sync

*function*

```python
def run_sync(graph: Graph | _Factory, *, on_graph: Callable[[CompiledGraph], None] | None = None, execute: bool = True, on_runtime: Callable[[Runtime], None] | None = None, session: _Session | None = None) -> None
```

Re-exported from: `pyrophone._runner`

Run a graph or zero-argument graph factory in a new event loop.

Graph factories may be synchronous or asynchronous. Construction and graph
execution share the same loop. No command-line arguments are parsed.
on_graph observes the validated snapshot before live node creation;
execute=False stops after validation and observation. on_runtime receives
editing handles after initialization, before node tasks start.

Ctrl-C cancels execution and completes cooperative cleanup without a
traceback. Other failures propagate. Inside an existing event loop, use
``await run_async(graph)`` instead.

[View source](https://github.com/messier-42/pyrophone/blob/f5e0987fb765db19a311f3cf3827e765495bdbb5/src/pyrophone/_runner.py#L33-L61)

**Modules**

- `pyrophone.cabe`
- `pyrophone.jq`
- `pyrophone.mqtt`
- `pyrophone.nodes`
- `pyrophone.script`
