---
source: lib/src/sdk/python/mod.rs
expression: client
---
# @generated by usage-cli from test.usage.kdl. Do not edit manually.
from __future__ import annotations
from typing import Optional
from .runtime import CliResult, CliRunner
from .types import AppFlags

class App:
    def __init__(self, bin_path: str = "app") -> None:
        self._runner = CliRunner(bin_path)

    def exec(self, flags: Optional[AppFlags] = None) -> CliResult:
        """[-v --verbose]"""
        cmd_args: list[str] = []
        flag_args = self._build_flag_args(flags)
        return self._runner.run(cmd_args + flag_args)

    def _build_flag_args(self, flags: Optional[AppFlags]) -> list[str]:
        result: list[str] = []
        if flags is None: return result
        if flags.verbose is not None and flags.verbose > 0: result.extend(["--verbose"] * flags.verbose)
        return result
