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

# autogen.io.OutputStream

<h2 id="autogen.io.OutputStream" class="doc doc-heading">
  <code class="doc-symbol doc-symbol-heading doc-symbol-class" />

  <span class="doc doc-object-name doc-class-name">OutputStream</span>
</h2>

```python theme={null}
OutputStream(*args, **kwargs)
```

Base class for protocol classes.<br />Protocol classes are defined as:: <br />    class Proto(Protocol): <br />        def meth(self) -> int: <br />            ...<br />Such classes are primarily used with static type checkers that recognize
structural subtyping (static duck-typing).<br />For example:: <br />    class C: <br />        def meth(self) -> int: <br />            return 0

def func(x: Proto) -> int: <br />        return x.meth()

func(C())  # Passes static type check

See PEP 544 for details. Protocol classes decorated with
@typing.runtime\_checkable act as simple-minded runtime protocols that check
only the presence of given attributes, ignoring their type signatures.<br />Protocol classes can be generic, they are defined as:: <br />    class GenProto[T](Protocol): <br />        def meth(self) -> T: <br />            ...

<b>Parameters:</b>

| Name       | Description |
| ---------- | ----------- |
| `*args`    |             |
| `**kwargs` |             |

### Instance Methods

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### print

```python theme={null}
print(
    self,
    *objects: Any,
    sep: str = ' ',
    end: str = '\n',
    flush: bool = False
) -> None
```

Print data to the output stream.<br />

<b>Parameters:</b>

| Name       | Description                                                                                                        |
| ---------- | ------------------------------------------------------------------------------------------------------------------ |
| `*objects` | **Type:** Any                                                                                                      |
| `sep`      | The separator between objects.<br /><br />Defaults to " ".<br /><br />**Type:** str<br /><br />**Default:** ' '    |
| `end`      | The end of the output.<br /><br />Defaults to "<br /><br />**Type:** str<br /><br />**Default:** '\n'              |
| `flush`    | Whether to flush the output.<br /><br />Defaults to False.<br /><br />**Type:** bool<br /><br />**Default:** False |

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### send

```python theme={null}
send(self, message: BaseEvent) -> None
```

Send data to the output stream.<br />

<b>Parameters:</b>

| Name      | Description                                                                                                                  |
| --------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `message` | BaseEvent from autogen.messages.base\_message<br /><br />**Type:** [BaseEvent](/docs/api-reference/autogen/events/BaseEvent) |

<br />
