gyoza.cli#

Command-line interface for gyoza.

gyoza.cli.main()[source]#

Run the gyoza CLI application.

Return type:

None

Shared error helpers for the gyoza CLI.

gyoza.cli.errors.fail(message)[source]#

Print an error message and terminate with exit code 1.

Return type:

None

Parameters:

message (str)

Build command for the gyoza CLI.

gyoza.cli.commands.build.build(path=<typer.models.ArgumentInfo object>)[source]#

Build the Docker image defined in gyoza.yml.

Return type:

None

Parameters:

path (str)

Deploy command for the gyoza CLI.

gyoza.cli.commands.deploy.deploy(path=<typer.models.ArgumentInfo object>)[source]#

Build, push, and register a gyoza operation on the gyoza server.

Return type:

None

Parameters:

path (str)

Run command for the gyoza CLI.

gyoza.cli.commands.run.run(file=<typer.models.OptionInfo object>, function=<typer.models.OptionInfo object>, input=<typer.models.OptionInfo object>, output=<typer.models.OptionInfo object>, inline_input=<typer.models.OptionInfo object>)[source]#

Execute a @gyoza_op function from a Python file.

Three input modes are supported:

  1. --inline-input — parse input directly from the CLI string.

  2. --input — read input from a JSON file at the given path.

  3. default — read input from the path in $GYOZA_INPUT_PATH.

In all modes the output dict is written as JSON to --output or $GYOZA_OUTPUT_PATH.

Return type:

None

Parameters:
  • file (str | None)

  • function (str | None)

  • input (str | None)

  • output (str | None)

  • inline_input (str | None)

Run-container command for the gyoza CLI.

gyoza.cli.commands.run_container.run_container(image=<typer.models.ArgumentInfo object>, input=<typer.models.OptionInfo object>, output=<typer.models.OptionInfo object>, inline_input=<typer.models.OptionInfo object>, no_map_paths=<typer.models.OptionInfo object>, docker_args=<typer.models.ArgumentInfo object>)[source]#

Run a gyoza operation inside its Docker container.

Wraps docker run with automatic volume mounts for input/output files. Any arguments after -- are forwarded directly to docker run.

Execution modes:

  1. --inline-input — parse input from the CLI string.

  2. --input — read input from a JSON file on the host.

  3. default — let the container use its built-in env defaults.

By default, string values in the input that point to existing local files or directories are bind-mounted and rewritten transparently. Use --no-map-paths to disable this.

Return type:

None

Parameters:
  • image (str)

  • input (str | None)

  • output (str | None)

  • inline_input (str | None)

  • no_map_paths (bool)

  • docker_args (list[str] | None)

Server sub-commands for the gyoza CLI.

gyoza.cli.commands.server.start(port=<typer.models.OptionInfo object>, worker_timeout=<typer.models.OptionInfo object>, scheduling_strategy=<typer.models.OptionInfo object>)[source]#

Start the gyoza server.

Return type:

None

Parameters:
  • port (int)

  • worker_timeout (int)

  • scheduling_strategy (str)

gyoza.cli.commands.server.list_definitions(as_json=<typer.models.OptionInfo object>)[source]#

List all OpDefinitions registered on the server.

Return type:

None

Parameters:

as_json (bool)

Version command for the gyoza CLI.

gyoza.cli.commands.version.version_cmd()[source]#

Print the installed gyoza version.

Return type:

None

Worker sub-commands for the gyoza CLI.

gyoza.cli.commands.worker.start(worker_id=<typer.models.OptionInfo object>, working_directory=<typer.models.OptionInfo object>, heartbeat_interval=<typer.models.OptionInfo object>)[source]#

Start the worker heartbeat and execution loop.

Return type:

None

Parameters:
  • worker_id (str | None)

  • working_directory (str)

  • heartbeat_interval (int)