liara.tools

Module Contents

Classes

Tool

Represents a command line tool that can be invoked by Liara.

SassCompiler

TypescriptCompiler

API

class liara.tools.Tool

Bases: abc.ABC

Represents a command line tool that can be invoked by Liara.

abstractmethod is_present() bool

Returns true if the tool is available and ready to use.

abstractmethod try_install() bool

Try to install the tool if it’s not present. This will produce a descriptive message if the installation fails.

abstractmethod invoke(cmd_line_arguments: List[str]) subprocess.CompletedProcess

Invoke the tool, return a subprocess.CompletedProcess instance. stderr and stdout is redirected to a subprocess.PIPE by default.

class liara.tools.SassCompiler

Bases: liara.tools.Tool

is_present() bool
invoke(cmd_line_arguments: List[str])
try_install()
class liara.tools.TypescriptCompiler

Bases: liara.tools.Tool

is_present() bool
invoke(cmd_line_arguments: List[str])
try_install()