> ## 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.InputStream

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

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

```python theme={null}
InputStream(*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" />

#### input

```python theme={null}
input(
    self,
    prompt: str = '',
    *,
    password: bool = False
) -> str
```

Read a line from the input stream.<br />

<b>Parameters:</b>

| Name       | Description                                                                                                       |
| ---------- | ----------------------------------------------------------------------------------------------------------------- |
| `prompt`   | The prompt to display.<br /><br />Defaults to "".<br /><br />**Type:** str<br /><br />**Default:** ''             |
| `password` | Whether to read a password.<br /><br />Defaults to False.<br /><br />**Type:** bool<br /><br />**Default:** False |

<b>Returns:</b>

| Type | Description                               |
| ---- | ----------------------------------------- |
| str  | str: The line read from the input stream. |

<br />
