Skip to content

OutputWriter

Sub classes

Name Children Inherits
DefaultOutputWriter
slashed.output
Default output implementation using rich if available.
CallbackOutputWriter
slashed.output
Output writer that directly delegates printing to a callback function.
    TransformOutputWriter
    slashed.output
    Output writer that transforms messages before printing via another writer.
      TextualOutputWriter
      slashed.textual_adapter.app
      Output writer that routes messages to bound widgets.

        Base classes

        Name Children Inherits
        Protocol
        typing
        Base class for protocol classes.

        ⋔ Inheritance diagram

        graph TD
          1594020653["base.OutputWriter"]
          1073422405["typing.Protocol"]
          3481597255["typing.Generic"]
          2751680898["builtins.object"]
          1073422405 --> 1594020653
          3481597255 --> 1073422405
          2751680898 --> 3481597255

        🛈 DocStrings

        Bases: Protocol

        Interface for command output.

        Source code in src/slashed/base.py
        class OutputWriter(Protocol):
            """Interface for command output."""
        
            async def print(self, message: str) -> None:
                """Write a message to output."""
                ...
        

        print async

        print(message: str) -> None
        

        Write a message to output.

        Source code in src/slashed/base.py
        async def print(self, message: str) -> None:
            """Write a message to output."""
            ...
        

        :fa-brands-github: Show source on GitHub