Skip to content

base

Class info

Classes

Name Children Inherits
CommandHelp
clinspector.help_providers.base
Help information for a command.
    Example
    clinspector.help_providers.base
    An example command usage with description.
      HelpProvider
      clinspector.help_providers.base
      Protocol for CLI help providers.

      🛈 DocStrings

      Module for different CLI help providers.

      CommandHelp dataclass

      Help information for a command.

      Source code in src/clinspector/help_providers/base.py
      @dataclasses.dataclass
      class CommandHelp:
          """Help information for a command."""
      
          name: str
          """The command name."""
          description: str
          """A description of what the command does."""
          examples: list[Example]
          """Usage examples."""
          platform: str = ""
          """Platform this help is for (linux, osx etc)."""
          language: str = "en"
          """Language of the help text."""
      

      description instance-attribute

      description: str
      

      A description of what the command does.

      examples instance-attribute

      examples: list[Example]
      

      Usage examples.

      language class-attribute instance-attribute

      language: str = 'en'
      

      Language of the help text.

      name instance-attribute

      name: str
      

      The command name.

      platform class-attribute instance-attribute

      platform: str = ''
      

      Platform this help is for (linux, osx etc).

      Example dataclass

      An example command usage with description.

      Source code in src/clinspector/help_providers/base.py
      @dataclasses.dataclass
      class Example:
          """An example command usage with description."""
      
          description: str
          """Description of what the example does."""
          command: str
          """The actual command with placeholders."""
          placeholders: dict[str, str]
          """Mapping of placeholder names to descriptions."""
      

      command instance-attribute

      command: str
      

      The actual command with placeholders.

      description instance-attribute

      description: str
      

      Description of what the example does.

      placeholders instance-attribute

      placeholders: dict[str, str]
      

      Mapping of placeholder names to descriptions.

      HelpProvider

      Bases: Protocol

      Protocol for CLI help providers.

      Source code in src/clinspector/help_providers/base.py
      class HelpProvider(Protocol):
          """Protocol for CLI help providers."""
      
          async def get_command_help(self, command: str) -> CommandHelp:
              """Get help information for a command."""
              ...
      
          async def search_commands(self, query: str) -> list[str]:
              """Search for commands matching query."""
              ...
      
          async def list_commands(self) -> list[str]:
              """List all available commands."""
              ...
      

      get_command_help async

      get_command_help(command: str) -> CommandHelp
      

      Get help information for a command.

      Source code in src/clinspector/help_providers/base.py
      async def get_command_help(self, command: str) -> CommandHelp:
          """Get help information for a command."""
          ...
      

      list_commands async

      list_commands() -> list[str]
      

      List all available commands.

      Source code in src/clinspector/help_providers/base.py
      async def list_commands(self) -> list[str]:
          """List all available commands."""
          ...
      

      search_commands async

      search_commands(query: str) -> list[str]
      

      Search for commands matching query.

      Source code in src/clinspector/help_providers/base.py
      async def search_commands(self, query: str) -> list[str]:
          """Search for commands matching query."""
          ...