autonomy.cli.utils.click_
utils
Usefule click utils.
image_
profile_
flag
def image_profile_flag(default: str = ImageProfiles.PRODUCTION,
mark_default: bool = True) -> Callable
Choice of one flag between: '--local/--remote'.
abci_
spec_
format_
flag
def abci_spec_format_flag(
default: str = FSMSpecificationLoader.OutputFormats.YAML,
mark_default: bool = True) -> Callable
Flags for abci spec outputs formats.
chain_
selection_
flag
def chain_selection_flag(
default: ChainType = ChainType.LOCAL,
mark_default: bool = True,
help_string_format:
str = "To use {} chain profile to interact with the contracts"
) -> Callable
Flags for abci spec outputs formats.
sys_
path_
patch
@contextlib.contextmanager
def sys_path_patch(path: Path) -> Generator
Patch sys.path variable with new import path at highest priority.
PathArgument Objects
class PathArgument(click.Path)
Path parameter for CLI.
convert
def convert(value: Any, param: Optional[click.Parameter],
ctx: Optional[click.Context]) -> Optional[Path]
Convert path string to pathlib.Path
NFTArgument Objects
class NFTArgument(click.ParamType)
NFT parameter for minting tools.
get_
metavar
def get_metavar(param: click.Parameter) -> str
Get metavar
convert
def convert(value: Any, param: Optional[click.Parameter],
ctx: Optional[click.Context]) -> Optional[Union[Path, IPFSHash]]
Convert path string to pathlib.Path
image_
author_
option
def image_author_option(fn: Callable) -> Callable
Wrap function with clik option for image-author