def cli(ctx: click.core.Context, url: str, request_id: str) -> None: """Python library for convenient access to the iov42 platform..""" ctx.ensure_object(dict) # TODO: lazy creation of identity for the 'create identity' command. For now # we provide a dummy identity which will replaced at a later stage. ctx.obj["url"] = url ctx.obj["request_id"] = request_id
def main(ctx: click.core.Context, db: str): """tasks3 is a commandline tool to create and manage tasks and todo lists""" ctx.ensure_object(dict) ctx.obj["DB"] = db return 0
def main(ctx: click.core.Context, broker_url: str, queue_name: str, connection_timeout: int): """Simple CLI for messaging""" ctx.ensure_object(dict) ctx.obj["BROKER_URL"] = broker_url ctx.obj["QUEUE_NAME"] = queue_name ctx.obj["CONNECTION_TIMEOUT"] = connection_timeout
def cli(ctx: click.core.Context, encrypt: bool, input_file: TextIO, output_file: TextIO) -> None: """Allows to encrypt or decrypt plain text or text files with various ciphers.""" ctx.ensure_object(dict) ctx.obj['is_encrypt'] = encrypt if input_file is None: input_text = click.prompt("Enter input") ctx.obj['input_stream'] = StringIO(input_text) else: ctx.obj['input_stream'] = input_file print("Input loaded from {0}".format(input_file.name)) if output_file is None: ctx.obj['output_stream'] = StringIO() else: ctx.obj['output_stream'] = output_file ctx.obj['to_stdout'] = output_file is None
def main(ctx: click.core.Context) -> None: print('---> main') # ensure that ctx.obj exists and is a dict ctx.ensure_object(dict)
def main(ctx: click.core.Context) -> None: """ Defines a group of commands """ ctx.ensure_object(dict)