.. _message_types: Message types and animations ============================== You can view example output of the library using the python scripts in the provided examples directory. Basic Message Types -------------------- ``cliasi`` provides several methods for common message types, each with its own symbol and color. Here is how they look in the console: .. code-block:: python :caption: examples/basic_messages.py from cliasi import cli cli.info("Starting process...") cli.success("Process completed!") cli.warn("Disk space is low.") cli.fail("Failed to connect to server.") cli.log("Debug info") cli.list("List item") .. raw:: html .. note:: The output above is a simulation of how it appears in a terminal with color support.
i [CLI] | Starting process...
✔ [CLI] | Process completed!
! [CLI] | Disk space is low.
X [CLI] | Failed to connect to server.
LOG [CLI] | Debug info
- [CLI] | List item
X [CLI] | Uncaught exception:
X [CLI] | Traceback (most recent call last):
| File "examples/exception_message.py", line 4, in <module>
| raise ValueError("An example error")
| ValueError: An example error