brk-code

cleo の API リファレンス

cleo (python-poetry/cleo) の公開 API 80 件 —— クラス 24、関数 4、メソッド 52。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: python-poetry/cleo

種別件数
クラス24
関数4
メソッド52

API 一覧

funcsrc.cleo._utils.find_similar_names(name:str, names:list[str]) -> list[str]
Finds names similar to a given command name.
funcsrc.cleo._utils.wcswidth(s:str) -> int
Determine how many columns are needed to display a string in a terminal.
funcsrc.cleo._utils.wcwidth(c:str) -> int
Determine how many columns are needed to display a character in a terminal.
methodsrc.cleo.commands.command.Command.add_style(name:str, fg:str | None=None, bg:str | None=None, options:list[str] | None=None) -> None
Adds a new style
methodsrc.cleo.commands.command.Command.argument(name:str) -> Any
Get the value of a command argument.
methodsrc.cleo.commands.command.Command.ask(question:str | Question, default:Any | None=None) -> Any
Prompt the user for input.
methodsrc.cleo.commands.command.Command.call(name:str, args:str | None=None) -> int
Call another command.
methodsrc.cleo.commands.command.Command.call_silent(name:str, args:str | None=None) -> int
Call another command silently.
methodsrc.cleo.commands.command.Command.comment(text:str) -> None
Write a string as comment output.
methodsrc.cleo.commands.command.Command.confirm(question:str, default:bool=False, true_answer_regex:str='(?i)^y') -> bool
Confirm a question with the user.
methodsrc.cleo.commands.command.Command.create_question(question:str, type:Literal['choice', 'confirmation'] | None=None, **kwargs:Any) -> Question
Returns a Question of specified type.
methodsrc.cleo.commands.command.Command.handle() -> int
Execute the command.
methodsrc.cleo.commands.command.Command.info(text:str) -> None
Write a string as information output.
methodsrc.cleo.commands.command.Command.interact(io:IO) -> None
Interacts with the user.
methodsrc.cleo.commands.command.Command.line(text:str, style:str | None=None, verbosity:Verbosity=Verbosity.NORMAL) -> None
Write a string as information output.
methodsrc.cleo.commands.command.Command.line_error(text:str, style:str | None=None, verbosity:Verbosity=Verbosity.NORMAL) -> None
Write a string as information output to stderr.
methodsrc.cleo.commands.command.Command.option(name:str) -> Any
Get the value of a command option.
methodsrc.cleo.commands.command.Command.overwrite(text:str) -> None
Overwrites the current line.
methodsrc.cleo.commands.command.Command.progress_bar(max:int=0) -> ProgressBar
Creates a new progress bar
methodsrc.cleo.commands.command.Command.progress_indicator(fmt:str | None=None, interval:int=100, values:list[str] | None=None) -> ProgressIndicator
Creates a new progress indicator.
methodsrc.cleo.commands.command.Command.question(text:str) -> None
Write a string as question output.
methodsrc.cleo.commands.command.Command.render_table(headers:str, rows:Rows, style:str | None=None) -> None
Format input to textual table.
methodsrc.cleo.commands.command.Command.table(header:str | None=None, rows:Rows | None=None, style:str | None=None) -> Table
Return a Table instance.
methodsrc.cleo.commands.command.Command.table_separator() -> TableSeparator
Return a TableSeparator instance.
methodsrc.cleo.commands.command.Command.write(text:str, style:str | None=None) -> None
Writes a string without a new line.
methodsrc.cleo.cursor.Cursor.clear_line() -> Cursor
Clears all the output from the current line.
methodsrc.cleo.cursor.Cursor.clear_screen() -> Cursor
Clears the entire screen.
classsrc.cleo.events.console_command_event.ConsoleCommandEvent
An event triggered before the command is executed.
classsrc.cleo.events.console_event.ConsoleEvent
An event that gives access to the IO of a command.
classsrc.cleo.events.console_signal_event.ConsoleSignalEvent
An event triggered by a system signal.
classsrc.cleo.events.event.Event
Event
classsrc.cleo.exceptions.CleoCommandNotFoundError
Raised when called command does not exist.
classsrc.cleo.exceptions.CleoError
Base Cleo exception.
classsrc.cleo.exceptions.CleoNamespaceNotFoundError
Raised when called namespace has no commands.
classsrc.cleo.exceptions.CleoNoSuchOptionError
Raised when command does not have given option.
classsrc.cleo.exceptions.CleoUserError
Base exception for user errors.
classsrc.cleo.exceptions.CleoValueError
Raised when wrong value was given to Cleo components.
methodsrc.cleo.formatters.formatter.Formatter.escape(text:str) -> str
Escapes "<" special char in given text.
methodsrc.cleo.formatters.formatter.Formatter.escape_trailing_backslash(text:str) -> str
Escapes trailing "\" in given text.
funcsrc.cleo.helpers.tokenize(string:str) -> list[str]
Split the string using shell-like syntax.
classsrc.cleo.io.inputs.argument.Argument
A command line argument.
classsrc.cleo.io.inputs.argv_input.ArgvInput
Represents an input coming from the command line.
classsrc.cleo.io.inputs.input.Input
This class is the base class for concrete Input implementations.
methodsrc.cleo.io.inputs.input.Input.close() -> None
Closes the input.
methodsrc.cleo.io.inputs.input.Input.is_closed() -> bool
Returns whether the input is closed.
methodsrc.cleo.io.inputs.input.Input.parameter_option(values:str | list[str], default:Any=False, only_params:bool=False) -> Any
Returns the value of a raw option (not parsed).
methodsrc.cleo.io.inputs.input.Input.read(length:int, default:str='') -> str
Reads the given amount of characters from the input stream.
methodsrc.cleo.io.inputs.input.Input.read_line(length:int=-1, default:str='') -> str
Reads a line from the input stream.
classsrc.cleo.io.inputs.option.Option
A command line option.
classsrc.cleo.io.inputs.string_input.StringInput
Represents an input provided as a string
classsrc.cleo.testers.application_tester.ApplicationTester
Eases the testing of console applications.
methodsrc.cleo.testers.application_tester.ApplicationTester.execute(args:str='', inputs:str | None=None, interactive:bool=True, verbosity:Verbosity | None=None, decorated:bool=False, supports_utf8:bool=True) -> int
Executes the command
classsrc.cleo.testers.command_tester.CommandTester
Eases the testing of console commands.
methodsrc.cleo.testers.command_tester.CommandTester.execute(args:str='', inputs:str | None=None, interactive:bool | None=None, verbosity:Verbosity | None=None, decorated:bool | None=None, supports_utf8:bool=True) -> int
Executes the command
classsrc.cleo.ui.choice_question.ChoiceQuestion
Multiple choice question.
classsrc.cleo.ui.confirmation_question.ConfirmationQuestion
Represents a yes/no question.
classsrc.cleo.ui.exception_trace.component.ExceptionTrace
Renders the trace of an exception.
classsrc.cleo.ui.progress_bar.ProgressBar
The ProgressBar provides helpers to display progress output.
methodsrc.cleo.ui.progress_bar.ProgressBar.advance(step:int=1) -> None
Advances the progress output X steps.
methodsrc.cleo.ui.progress_bar.ProgressBar.clear() -> None
Removes the progress bar from the current line.
methodsrc.cleo.ui.progress_bar.ProgressBar.display() -> None
Output the current progress string.
methodsrc.cleo.ui.progress_bar.ProgressBar.finish() -> None
Finish the progress output.
methodsrc.cleo.ui.progress_bar.ProgressBar.set_progress(step:int) -> None
Sets the current progress.
methodsrc.cleo.ui.progress_bar.ProgressBar.start(max:int | None=None) -> None
Start the progress output.
classsrc.cleo.ui.progress_indicator.ProgressIndicator
A process indicator.
methodsrc.cleo.ui.progress_indicator.ProgressIndicator.auto(start_message:str, end_message:str) -> Iterator[ProgressIndicator]
Auto progress.
classsrc.cleo.ui.question.Question
A question that will be asked in a Console.
methodsrc.cleo.ui.question.Question.ask(io:IO) -> Any
Asks the question to the user.
classsrc.cleo.ui.table_style.TableStyle
Defines styles for Table instances.
methodsrc.cleo.ui.table_style.TableStyle.set_border_format(border_format:str) -> TableStyle
Sets the border format.
methodsrc.cleo.ui.table_style.TableStyle.set_cell_header_format(cell_header_format:str) -> TableStyle
Sets the header cell format.
methodsrc.cleo.ui.table_style.TableStyle.set_cell_row_content_format(cell_row_content_format:str) -> TableStyle
Sets the row cell content format.
methodsrc.cleo.ui.table_style.TableStyle.set_cell_row_format(cell_row_format:str) -> TableStyle
Sets the row cell format.
methodsrc.cleo.ui.table_style.TableStyle.set_default_crossing_char(char:str) -> TableStyle
Sets default crossing character used for each cross.
methodsrc.cleo.ui.table_style.TableStyle.set_footer_title_format(footer_title_format:str) -> TableStyle
Sets the footer title format.
methodsrc.cleo.ui.table_style.TableStyle.set_header_title_format(header_title_format:str) -> TableStyle
Sets the header title format.
methodsrc.cleo.ui.table_style.TableStyle.set_horizontal_border_chars(outside:str, inside:str | None=None) -> TableStyle
Sets horizontal border characters.
methodsrc.cleo.ui.table_style.TableStyle.set_pad_type(pad_type:str) -> TableStyle
Sets the padding type.
methodsrc.cleo.ui.table_style.TableStyle.set_padding_char(padding_char:str) -> TableStyle
Sets padding character, used for cell padding.
methodsrc.cleo.ui.table_style.TableStyle.set_vertical_border_chars(outside:str, inside:str | None=None) -> TableStyle
Sets vertical border characters.

この情報について

掲載しているシグネチャは python-poetry/cleo の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る